Skip to content

Commit

Permalink
fix(Vulkan) EXT_debug_utils function dispatch. Close #755
Browse files Browse the repository at this point in the history
Function pointers are now retrieved strictly based on the extension type
(instance or device), regardless of the dispatchable parameter type.
  • Loading branch information
Spasi committed Apr 19, 2022
1 parent 2a8645c commit e19a2f6
Show file tree
Hide file tree
Showing 9 changed files with 436 additions and 428 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This build includes the following changes:
- Core: Fixed `dlerror` decoding to use UTF-8. (#738)
- Build: Fixed offline mode with multiple local architectures. (#740)
- Vulkan: Fixed definition of the `VK_API_VERSION_PATCH` macro. (#743)
- Vulkan: Fixed `EXT_debug_utils` function dispatch. (#755)

#### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ protected EXTDebugUtils() {

/** Unsafe version of: {@link #vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT} */
public static int nvkSetDebugUtilsObjectNameEXT(VkDevice device, long pNameInfo) {
long __functionAddress = device.getCapabilities().vkSetDebugUtilsObjectNameEXT;
long __functionAddress = device.getCapabilitiesInstance().vkSetDebugUtilsObjectNameEXT;
if (CHECKS) {
check(__functionAddress);
}
Expand Down Expand Up @@ -436,7 +436,7 @@ public static int vkSetDebugUtilsObjectNameEXT(VkDevice device, @NativeType("VkD

/** Unsafe version of: {@link #vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT} */
public static int nvkSetDebugUtilsObjectTagEXT(VkDevice device, long pTagInfo) {
long __functionAddress = device.getCapabilities().vkSetDebugUtilsObjectTagEXT;
long __functionAddress = device.getCapabilitiesInstance().vkSetDebugUtilsObjectTagEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugUtilsObjectTagInfoEXT.validate(pTagInfo);
Expand Down Expand Up @@ -497,7 +497,7 @@ public static int vkSetDebugUtilsObjectTagEXT(VkDevice device, @NativeType("VkDe

/** Unsafe version of: {@link #vkQueueBeginDebugUtilsLabelEXT QueueBeginDebugUtilsLabelEXT} */
public static void nvkQueueBeginDebugUtilsLabelEXT(VkQueue queue, long pLabelInfo) {
long __functionAddress = queue.getCapabilities().vkQueueBeginDebugUtilsLabelEXT;
long __functionAddress = queue.getCapabilitiesInstance().vkQueueBeginDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugUtilsLabelEXT.validate(pLabelInfo);
Expand Down Expand Up @@ -581,7 +581,7 @@ public static void vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, @NativeType("Vk
* @param queue the queue in which a debug label region should be closed.
*/
public static void vkQueueEndDebugUtilsLabelEXT(VkQueue queue) {
long __functionAddress = queue.getCapabilities().vkQueueEndDebugUtilsLabelEXT;
long __functionAddress = queue.getCapabilitiesInstance().vkQueueEndDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
}
Expand All @@ -592,7 +592,7 @@ public static void vkQueueEndDebugUtilsLabelEXT(VkQueue queue) {

/** Unsafe version of: {@link #vkQueueInsertDebugUtilsLabelEXT QueueInsertDebugUtilsLabelEXT} */
public static void nvkQueueInsertDebugUtilsLabelEXT(VkQueue queue, long pLabelInfo) {
long __functionAddress = queue.getCapabilities().vkQueueInsertDebugUtilsLabelEXT;
long __functionAddress = queue.getCapabilitiesInstance().vkQueueInsertDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugUtilsLabelEXT.validate(pLabelInfo);
Expand Down Expand Up @@ -641,7 +641,7 @@ public static void vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, @NativeType("V

/** Unsafe version of: {@link #vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT} */
public static void nvkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, long pLabelInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdBeginDebugUtilsLabelEXT;
long __functionAddress = commandBuffer.getCapabilitiesInstance().vkCmdBeginDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugUtilsLabelEXT.validate(pLabelInfo);
Expand Down Expand Up @@ -746,7 +746,7 @@ public static void vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, @
* @param commandBuffer the command buffer into which the command is recorded.
*/
public static void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdEndDebugUtilsLabelEXT;
long __functionAddress = commandBuffer.getCapabilitiesInstance().vkCmdEndDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
}
Expand All @@ -757,7 +757,7 @@ public static void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) {

/** Unsafe version of: {@link #vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT} */
public static void nvkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, long pLabelInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdInsertDebugUtilsLabelEXT;
long __functionAddress = commandBuffer.getCapabilitiesInstance().vkCmdInsertDebugUtilsLabelEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugUtilsLabelEXT.validate(pLabelInfo);
Expand Down
Loading

0 comments on commit e19a2f6

Please sign in to comment.