diff options
| author | João Ramos <jplramos1993@gmail.com> | 2026-11-22 16:05:32 +0000 |
|---|---|---|
| committer | João Ramos <jplramos1993@gmail.com> | 2026-11-22 16:05:32 +0000 |
| commit | e4e87a69e0f822a8b91dccef8be13d8402c005d4 (patch) | |
| tree | f4d5438f2036307e4106afac47a44b53d53dbda8 /runtime/src | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
vulkan_replay: the postbuild branch's names no longer hide emit's (C4456)
The if-init `info` of the AccelerationStructurePostbuild branch stays in scope through the following
`else if`, so the BLAS/TLAS build branch's VkAccelerationStructureBuildGeometryInfoKHR `info` hid it,
and the branch's loop `i` hid emit's command index. Both are renamed (`postbuild`, `s`); no change in
behaviour.
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/vulkan_replay.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h index 2a37f58f5..c853f6a55 100644 --- a/runtime/src/vulkan_replay.h +++ b/runtime/src/vulkan_replay.h | |||
| @@ -3171,9 +3171,10 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c | |||
| 3171 | vk.xdxr_record(command_buffer, *xdxr_build); | 3171 | vk.xdxr_record(command_buffer, *xdxr_build); |
| 3172 | } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { | 3172 | } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { |
| 3173 | vk.xdxr_copy(command_buffer, copy->src_va, copy->dst_va, p.xdxr_bytes); | 3173 | vk.xdxr_copy(command_buffer, copy->src_va, copy->dst_va, p.xdxr_bytes); |
| 3174 | } else if (const auto* info = std::get_if<AccelerationStructurePostbuild>(&command); info && !p.skip) { | 3174 | } else if (const auto* postbuild = std::get_if<AccelerationStructurePostbuild>(&command); |
| 3175 | for (std::size_t i = 0; i < info->sources.size(); ++i) | 3175 | postbuild && !p.skip) { |
| 3176 | vk.xdxr_postbuild(command_buffer, info->sources[i], info->dest_va + 8 * i); | 3176 | for (std::size_t s = 0; s < postbuild->sources.size(); ++s) |
| 3177 | vk.xdxr_postbuild(command_buffer, postbuild->sources[s], postbuild->dest_va + 8 * s); | ||
| 3177 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { | 3178 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { |
| 3178 | // The build's addresses are console VAs into the GPU address arena (heap_base is its device address). | 3179 | // The build's addresses are console VAs into the GPU address arena (heap_base is its device address). |
| 3179 | // A null VA (no index buffer, no transform) stays null: heap_base + 0 would name the arena's zero page. | 3180 | // A null VA (no index buffer, no transform) stays null: heap_base + 0 would name the arena's zero page. |