upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_backend.h
diff options
context:
space:
mode:
authorHadagalberto Junior <hadagalberto.junior1@gmail.com>2026-11-22 11:52:20 -0300
committerHadagalberto Junior <hadagalberto.junior1@gmail.com>2026-11-22 11:52:23 -0300
commit0bde4c82d7bb26a255aa2e8a403c982f08ea2aa5 (patch)
tree7ca4d7e8ccad7a9ab53f7510a309e3ab2cde143f /runtime/src/vulkan_backend.h
parent6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff)
Runtime: split pipeline statistics around predication and footprint helpers (D3D-162)
Replay refused SetPredication, predicated buffer copies and D24/RGB96 footprint conversions while a pipeline-statistics query was active (#1624 added the last), because their compute dispatches would count in the application's CSInvocations. They now get the segment split #1519 gave resolves: the statistics query ends its current physical segment right before the helper dispatch and begins the next right after it, and its result is the per-counter sum of the segments. Query resolves and these helpers share one segment numbering. The markers for non-query commands live on detail::Prepared, and emit() places them around capture_predicate, emit_predicated_copy and the depth24 conversion parts, outside any rendering scope. Without a statistics segment pool (the single-list replay(), or a queue without the summation helper), the three commands are still refused while statistics are active, before any helper scratch is allocated (prepare() takes statistics_helpers, false by default) and again in QueryReplay::plan. Tests (Khronos validation on): vk_predicated_copy and depth24_convert run their helpers inside an otherwise empty statistics query. Their results stay byte-exact and all 11 counters are 0. d3d12_predicated_copy compares with WARP the same way. replay_query_predication checks the emitted order for a capture, a predicated copy, a footprint copy and a resolve in one query, and the refusal without a pool. predicated_copy and typeless_rtv check both preparation modes. Co-Authored-By: OpenAI Codex <noreply@openai.com> 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h
index e577e6af0..490108f04 100644
--- a/runtime/src/vulkan_backend.h
+++ b/runtime/src/vulkan_backend.h
@@ -1355,7 +1355,7 @@ public:
1355 std::uint32_t segments = 0, statistics_segments = 0; 1355 std::uint32_t segments = 0, statistics_segments = 0;
1356 bool has_queries = false; 1356 bool has_queries = false;
1357 for (std::size_t i = 0; i < lists.size(); ++i) { 1357 for (std::size_t i = 0; i < lists.size(); ++i) {
1358 const auto result = prepare(*lists[i], resolve, replay, prepared[i]); 1358 const auto result = prepare(*lists[i], resolve, replay, prepared[i], can_resolve_occlusion);
1359 if (result != ReplayResult::success) return result; 1359 if (result != ReplayResult::success) return result;
1360 if (prepared[i].segment_count > UINT32_MAX - segments || 1360 if (prepared[i].segment_count > UINT32_MAX - segments ||
1361 prepared[i].statistics_segment_count > UINT32_MAX - statistics_segments) 1361 prepared[i].statistics_segment_count > UINT32_MAX - statistics_segments)