Fix validation errors

This commit is contained in:
Evan Hemsley 2026-05-20 11:55:06 -07:00
parent 3441b18aa5
commit d95bc52642
2 changed files with 8 additions and 1 deletions

View file

@ -7140,7 +7140,7 @@ static SDL_GPUQueryPool *VULKAN_CreateQueryPool(
vkQueryPoolCreateInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;
vkQueryPoolCreateInfo.pNext = NULL;
vkQueryPoolCreateInfo.flags = VK_QUERY_POOL_CREATE_RESET_BIT_KHR;
vkQueryPoolCreateInfo.flags = 0;
vkQueryPoolCreateInfo.pipelineStatistics = 0;
vkQueryPoolCreateInfo.queryCount = createinfo->query_count;
vkQueryPoolCreateInfo.queryType = SDLToVK_QueryType[createinfo->type];
@ -10020,6 +10020,12 @@ static void VULKAN_BeginQuery(
VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
VulkanQueryPool *vulkanQueryPool = (VulkanQueryPool *)pool;
renderer->vkCmdResetQueryPool(
vulkanCommandBuffer->commandBuffer,
vulkanQueryPool->pool,
index,
1);
// Timestamp queries don't begin and end, we just need a distinction between
// a timestamp written when preceding commands are taken and when preceding commands are finished.
if (vulkanQueryPool->type == SDL_GPU_QUERY_TIMESTAMP) {

View file

@ -109,6 +109,7 @@ VULKAN_DEVICE_FUNCTION(vkCmdDrawIndirect)
VULKAN_DEVICE_FUNCTION(vkCmdEndRenderPass)
VULKAN_DEVICE_FUNCTION(vkCmdEndQuery)
VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier)
VULKAN_DEVICE_FUNCTION(vkCmdResetQueryPool)
VULKAN_DEVICE_FUNCTION(vkCmdResolveImage)
VULKAN_DEVICE_FUNCTION(vkCmdSetBlendConstants)
VULKAN_DEVICE_FUNCTION(vkCmdSetDepthBias)