diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:36:19 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:36:19 -0500 |
| commit | 3a2820b3bff812ff3cff6a4d4087912edb0541bb (patch) | |
| tree | ab2522760b3930781a3531f7ded56ba449041e77 /runtime/src/vulkan_backend.h | |
| parent | 75f6890bb98214d5112c7eb1126f67f9e2948a0a (diff) | |
| parent | c1e1ef0b81234ac46ca25a810ab81219408ea6ba (diff) | |
Merge main c1e1ef0b8 into RT-POST-LOAD-GPU-MEMORY (#2098)
Two conflicts:
- d3d12_com.cpp, note_direct_heap_indexing: main's console_descriptor_table_va(cbv_srv_uav_base_) for the tracked
table, with this branch's per-site once() flag instead of note_once on every draw.
- d3d12_vulkan_device.cpp, PipelineState::build_compute: this branch's body (build_compute_pipeline, journal, compile
helper). main's dev_status::Build around the compute create moves into build_compute_pipeline, next to the
pipeline_profile::DriverCall, so the status line still names the compute pipeline in the driver.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_backend.h')
| -rw-r--r-- | runtime/src/vulkan_backend.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h index dd5a44ef7..4a4d9d485 100644 --- a/runtime/src/vulkan_backend.h +++ b/runtime/src/vulkan_backend.h | |||
| @@ -131,7 +131,8 @@ struct VulkanDeviceFunctions { | |||
| 131 | X(vkCreatePipelineCache) X(vkDestroyPipelineCache) X(vkGetPipelineCacheData) X(vkMergePipelineCaches) \ | 131 | X(vkCreatePipelineCache) X(vkDestroyPipelineCache) X(vkGetPipelineCacheData) X(vkMergePipelineCaches) \ |
| 132 | X(vkCreateEvent) X(vkDestroyEvent) X(vkResetEvent) X(vkCmdSetEvent) X(vkCmdWaitEvents) X(vkCmdDrawMeshTasksEXT) X(vkCmdDrawMeshTasksIndirectEXT) X(vkCmdDrawMeshTasksIndirectCountEXT) \ | 132 | X(vkCreateEvent) X(vkDestroyEvent) X(vkResetEvent) X(vkCmdSetEvent) X(vkCmdWaitEvents) X(vkCmdDrawMeshTasksEXT) X(vkCmdDrawMeshTasksIndirectEXT) X(vkCmdDrawMeshTasksIndirectCountEXT) \ |
| 133 | X(vkCreateRenderPass2) X(vkDestroyRenderPass) X(vkCreateFramebuffer) X(vkDestroyFramebuffer) \ | 133 | X(vkCreateRenderPass2) X(vkDestroyRenderPass) X(vkCreateFramebuffer) X(vkDestroyFramebuffer) \ |
| 134 | X(vkCmdBeginRenderPass) X(vkCmdEndRenderPass) | 134 | X(vkCmdBeginRenderPass) X(vkCmdEndRenderPass) \ |
| 135 | X(vkCmdBeginQueryIndexedEXT) X(vkCmdEndQueryIndexedEXT) | ||
| 135 | #define LEONIDA_VK_MEMBER(name) PFN_##name name = nullptr; | 136 | #define LEONIDA_VK_MEMBER(name) PFN_##name name = nullptr; |
| 136 | LEONIDA_VK_DEVICE_FUNCTIONS(LEONIDA_VK_MEMBER) | 137 | LEONIDA_VK_DEVICE_FUNCTIONS(LEONIDA_VK_MEMBER) |
| 137 | #undef LEONIDA_VK_MEMBER | 138 | #undef LEONIDA_VK_MEMBER |
| @@ -166,6 +167,9 @@ struct VulkanDeviceFunctions { | |||
| 166 | return vkCmdBeginRendering && vkCmdEndRendering && vkCmdBindVertexBuffers2 && vkCmdSetPrimitiveTopology && | 167 | return vkCmdBeginRendering && vkCmdEndRendering && vkCmdBindVertexBuffers2 && vkCmdSetPrimitiveTopology && |
| 167 | vkCmdSetPrimitiveRestartEnable; | 168 | vkCmdSetPrimitiveRestartEnable; |
| 168 | } | 169 | } |
| 170 | // VK_EXT_transform_feedback is enabled on the device: the indexed-query entry points are loaded, so an | ||
| 171 | // SO_STATISTICS heap can be a real transform-feedback pool (D3D-302). | ||
| 172 | bool transform_feedback = false; | ||
| 169 | }; | 173 | }; |
| 170 | 174 | ||
| 171 | // Both kinds of compute resolve use the same storage buffer, descriptor set and pipeline layout. | 175 | // Both kinds of compute resolve use the same storage buffer, descriptor set and pipeline layout. |
| @@ -1123,6 +1127,8 @@ public: | |||
| 1123 | GraphicsIndirectCapabilities indirect = {}) | 1127 | GraphicsIndirectCapabilities indirect = {}) |
| 1124 | : device_(device), tracker_(separate_depth_stencil_layouts), ray_tracing_(ray_tracing) { | 1128 | : device_(device), tracker_(separate_depth_stencil_layouts), ray_tracing_(ray_tracing) { |
| 1125 | loaded_ = vk.load(get, device); | 1129 | loaded_ = vk.load(get, device); |
| 1130 | // VK_EXT_transform_feedback: enabled on the device when its indexed-query entry points resolved (D3D-302). | ||
| 1131 | vk.transform_feedback = vk.vkCmdBeginQueryIndexedEXT && vk.vkCmdEndQueryIndexedEXT; | ||
| 1126 | if (loaded_ && gpu_labels_.initialize(device, get)) { | 1132 | if (loaded_ && gpu_labels_.initialize(device, get)) { |
| 1127 | replay_.gpu_label = [this](VkCommandBuffer cb, const label::Write& write) { gpu_labels_.record(cb, write); }; | 1133 | replay_.gpu_label = [this](VkCommandBuffer cb, const label::Write& write) { gpu_labels_.record(cb, write); }; |
| 1128 | } | 1134 | } |
| @@ -1158,6 +1164,11 @@ public: | |||
| 1158 | replay_.reset_query_pool = vk.vkCmdResetQueryPool; | 1164 | replay_.reset_query_pool = vk.vkCmdResetQueryPool; |
| 1159 | replay_.begin_query = vk.vkCmdBeginQuery; | 1165 | replay_.begin_query = vk.vkCmdBeginQuery; |
| 1160 | replay_.end_query = vk.vkCmdEndQuery; | 1166 | replay_.end_query = vk.vkCmdEndQuery; |
| 1167 | // VK_EXT_transform_feedback (D3D-302), loaded when the device enabled it: indexed SO_STATISTICS queries. | ||
| 1168 | if (vk.transform_feedback) { | ||
| 1169 | replay_.begin_query_indexed = vk.vkCmdBeginQueryIndexedEXT; | ||
| 1170 | replay_.end_query_indexed = vk.vkCmdEndQueryIndexedEXT; | ||
| 1171 | } | ||
| 1161 | replay_.write_timestamp = vk.vkCmdWriteTimestamp; | 1172 | replay_.write_timestamp = vk.vkCmdWriteTimestamp; |
| 1162 | replay_.copy_query_pool_results = vk.vkCmdCopyQueryPoolResults; | 1173 | replay_.copy_query_pool_results = vk.vkCmdCopyQueryPoolResults; |
| 1163 | replay_.bind_pipeline = vk.vkCmdBindPipeline; | 1174 | replay_.bind_pipeline = vk.vkCmdBindPipeline; |