summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan
diff options
context:
space:
mode:
authorwarriormaster12 <streng.alexander@outlook.com>2023-05-10 21:05:58 +0300
committerwarriormaster12 <streng.alexander@outlook.com>2023-05-11 17:17:23 +0300
commit10797d58dd84f776ae3e0f972b2daefafb807e76 (patch)
tree3aa042260c6314ef8a635c139db6aff64a84f476 /drivers/vulkan
parentc80a2b4fe99dcd0bba6fc24ed2748b1474b24448 (diff)
downloadredot-engine-10797d58dd84f776ae3e0f972b2daefafb807e76.tar.gz
fixed a query pool validation error
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index e7dc2fabe1..69d9baf910 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -8924,6 +8924,11 @@ void RenderingDeviceVulkan::initialize(VulkanContext *p_context, bool p_local_de
}
}
+ for (int i = 0; i < frame_count; i++) {
+ //Reset all queries in a query pool before doing any operations with them.
+ vkCmdResetQueryPool(frames[0].setup_command_buffer, frames[i].timestamp_pool, 0, max_timestamp_query_elements);
+ }
+
staging_buffer_block_size = GLOBAL_GET("rendering/rendering_device/staging_buffer/block_size_kb");
staging_buffer_block_size = MAX(4u, staging_buffer_block_size);
staging_buffer_block_size *= 1024; // Kb -> bytes.