aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/overlay-layer
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-10-15 09:22:30 +0200
committerJason Ekstrand <[email protected]>2020-01-15 08:34:57 -0600
commitf33a68af63eb92cb62b40b6a405aed7b4ea1e920 (patch)
tree6530746efd9312f45df8972920435241b4c23618 /src/vulkan/overlay-layer
parent75755e0eba17f850036798ee7ed46db5e49c4513 (diff)
vulkan/overlay: Fix for Vulkan 1.2
v2 (Jason Ekstrand): - Add duplicate hooks for both the 1.2 and KHR versions of vkCmdDraw[Indexed]IndirectCount. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/vulkan/overlay-layer')
-rw-r--r--src/vulkan/overlay-layer/overlay.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp
index 7ab3463b2b4..6ec2f05826a 100644
--- a/src/vulkan/overlay-layer/overlay.cpp
+++ b/src/vulkan/overlay-layer/overlay.cpp
@@ -2044,7 +2044,7 @@ static void overlay_CmdDrawIndexedIndirect(
device_data->vtable.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride);
}
-static void overlay_CmdDrawIndirectCountKHR(
+static void overlay_CmdDrawIndirectCount(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
@@ -2057,12 +2057,12 @@ static void overlay_CmdDrawIndirectCountKHR(
FIND(struct command_buffer_data, commandBuffer);
cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_draw_indirect_count]++;
struct device_data *device_data = cmd_buffer_data->device;
- device_data->vtable.CmdDrawIndirectCountKHR(commandBuffer, buffer, offset,
- countBuffer, countBufferOffset,
- maxDrawCount, stride);
+ device_data->vtable.CmdDrawIndirectCount(commandBuffer, buffer, offset,
+ countBuffer, countBufferOffset,
+ maxDrawCount, stride);
}
-static void overlay_CmdDrawIndexedIndirectCountKHR(
+static void overlay_CmdDrawIndexedIndirectCount(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
@@ -2075,9 +2075,9 @@ static void overlay_CmdDrawIndexedIndirectCountKHR(
FIND(struct command_buffer_data, commandBuffer);
cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_draw_indexed_indirect_count]++;
struct device_data *device_data = cmd_buffer_data->device;
- device_data->vtable.CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset,
- countBuffer, countBufferOffset,
- maxDrawCount, stride);
+ device_data->vtable.CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset,
+ countBuffer, countBufferOffset,
+ maxDrawCount, stride);
}
static void overlay_CmdDispatch(
@@ -2513,6 +2513,7 @@ static const struct {
} name_to_funcptr_map[] = {
{ "vkGetDeviceProcAddr", (void *) vkGetDeviceProcAddr },
#define ADD_HOOK(fn) { "vk" # fn, (void *) overlay_ ## fn }
+#define ADD_ALIAS_HOOK(alias, fn) { "vk" # alias, (void *) overlay_ ## fn }
ADD_HOOK(AllocateCommandBuffers),
ADD_HOOK(FreeCommandBuffers),
ADD_HOOK(ResetCommandBuffer),
@@ -2526,8 +2527,10 @@ static const struct {
ADD_HOOK(CmdDrawIndexedIndirect),
ADD_HOOK(CmdDispatch),
ADD_HOOK(CmdDispatchIndirect),
- ADD_HOOK(CmdDrawIndirectCountKHR),
- ADD_HOOK(CmdDrawIndexedIndirectCountKHR),
+ ADD_HOOK(CmdDrawIndirectCount),
+ ADD_ALIAS_HOOK(CmdDrawIndirectCountKHR, CmdDrawIndirectCount),
+ ADD_HOOK(CmdDrawIndexedIndirectCount),
+ ADD_ALIAS_HOOK(CmdDrawIndexedIndirectCountKHR, CmdDrawIndexedIndirectCount),
ADD_HOOK(CmdBindPipeline),