test: indirect RT scratch size without nested std::max, miscompiled by MSVC 19.52 (TEST-INDIRECT-RT-ARENA) #954

Manually merged
github merged 1 commit from gh-pr/954/head into gh-pr/954/base 2026-11-26 09:30:14 +00:00
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 15:40 UTC · original
TheGeogeo:fix/indirect-rt-arena → main · +4 −2 · 1 files · 1 commits · merged 2026-11-24 20:44 UTC

Claimed in the coordination issue as: TEST-INDIRECT-RT-ARENA

What and why

d3d12_indirect_rt and d3d12_indirect_rt_upload_sysmem stopped at GPU address arena full ... buffer size in KiB: 105903 and FAIL: CreateCommittedResource(compaction/clone buffers) on an RTX 3080.

The sizes are not the problem. Printed on that GPU, in bytes (hex, result/scratch): BLAS a00/200, TLAS 800/300, the compaction BLAS from the layer a00/200, and from vkGetAccelerationStructureBuildSizesKHR b00/500. The compaction scratch buffer should be 0x600 bytes.

The cause is the compiler. MSVC 19.52.37029 (toolset 14.52) at /O2 /Ob1 compiles the test's

std::max<UINT64>(tlas_info.ScratchDataSizeInBytes,
                 std::max<UINT64>(blas_compact_info.ScratchDataSizeInBytes, compact_vk_sizes.buildScratchSize))

to this. _Right$ is meant to hold the inner result, but nothing in main stores it under that name. It shares its stack slot with tv7896, the saved vkDestroyDevice pointer. The code loads that pointer and reads the first eight bytes of the function as the size:

lea    rax, QWORD PTR tlas_info$65[rbp-248]
cmp    QWORD PTR tlas_info$65[rbp-248], rcx
cmovb  rax, QWORD PTR _Right$[rbp-256]
mov    rdx, QWORD PTR [rax]

That value is not a size, so arena_allocate refused it for being larger than the arena. The message prints the size through int(Width / 1024), so 105903 may be truncated.

The fix takes the maximum of the three values with one std::max over a list (and includes <algorithm> for it). The layer and the arena allocator are unchanged. Nothing is skipped.

Tested

Windows 11, MSVC 19.52.37029 (RelWithDebInfo).

After the rebase on main 6293c1c4 (d6b40a0a, same patch as 2bd79535). The head is now f4fc7623 on 58be9cdf, with the same patch; runtime/ on main did not change between the two, so these were not rerun:

  • With the test source from main, both tests fail with arena full ... buffer size in KiB: 105903. With this commit both pass, 4 runs out of 4.
  • Full ctest -j 1 --timeout 300: 259 passed, 1 failed, 12 skipped, gameinput disabled. The failure is d3d12_execute_indirect_validation, also failing in the first run below (#1066 is open for it). The skipped tests are the 12 listed below.
  • The XMA2 decoder was not built on this PC (its cargo step failed), so the CI link error fixed by #877 was not reproduced here.

First run, on main a2892784:

  • Before: both tests fail as above, and the failure repeats on every run. After: both pass. With LEONIDA_ARENA_LOG=1 the first allocation after the RT buffers is 0x600 bytes, as expected.
  • The unmodified test source compiled with the 14.51 toolset (19.51.36263) and linked with the same libraries passes on the same GPU; its listing has no such cmovb. Compiled with 14.52 and linked the same way, it fails. Adding only a printf of the values after the calculation also made the 14.52 build pass, so the failure depends on the surrounding code.
  • The listings of the five gta6rt_d3d12_com sources, built with the same flags, have no cmov from a _Left$/_Right$ slot that is never stored.
  • Both tests were rebuilt and rerun after adding <algorithm>: pass.
  • Full ctest -j 1 --timeout 300: 257 passed, 1 failed, 12 skipped (the log of the baseline f3e26be7: 255 passed, 3 failed, 12 skipped). The only failure is d3d12_execute_indirect_validation, which also fails in the baseline and is known (#306, #749). Every other result is unchanged. Skipped, as in the baseline (the run predates the <algorithm> line): shader_library_corpus, bink_decode, bink_abi, bink_play_headless, fsr_dispatch, bvh_builder, bink_audio, vk_sync_validation, d3d12_sparse_queue_family_contract, d3d12_rgb9e5_rtv, d3d12_boot_movie, d3d12_first_light. Disabled: gameinput.
  • git diff --check and python -I scripts/check_no_game_data.py runtime/test/d3d12_indirect_rt_test.cpp: clean.
  • #444 (a902c78a) and #710 (296508e1) each merge onto this commit without conflicts. Neither changes this calculation. Those merged trees were not built.

No CPU regression: the fault is in the code the compiler makes for this function, and a small standalone copy of the calculation, built with the same options, does not reproduce it.

With GPU-assisted validation on, the RayQueryKHR check misses on main and on this branch alike, with four VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281 reports; #710 describes the same result and covers the addresses. It is a separate topic and was not rerun here.

Not covered: the parts of these tests that need glslangValidator (the drawing and RayQueryKHR checks) are not built on this PC, the validation layer was off, GCC and Clang were not used. Whether other MSVC 14.52 builds have the same fault elsewhere was only checked in the files above.

GPUs tested: NVIDIA GeForce RTX 3080, driver 621.24, Windows 11

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)
**@⁠TheGeogeo** on GitHub · 2026-11-24 15:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/954) `TheGeogeo:fix/indirect-rt-arena` → `main` · +4 −2 · 1 files · 1 commits · merged 2026-11-24 20:44 UTC Claimed in the coordination issue as: [TEST-INDIRECT-RT-ARENA](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why `d3d12_indirect_rt` and `d3d12_indirect_rt_upload_sysmem` stopped at `GPU address arena full ... buffer size in KiB: 105903` and `FAIL: CreateCommittedResource(compaction/clone buffers)` on an RTX 3080. The sizes are not the problem. Printed on that GPU, in bytes (hex, result/scratch): BLAS `a00`/`200`, TLAS `800`/`300`, the compaction BLAS from the layer `a00`/`200`, and from `vkGetAccelerationStructureBuildSizesKHR` `b00`/`500`. The compaction scratch buffer should be `0x600` bytes. The cause is the compiler. MSVC 19.52.37029 (toolset 14.52) at `/O2 /Ob1` compiles the test's ```cpp std::max<UINT64>(tlas_info.ScratchDataSizeInBytes, std::max<UINT64>(blas_compact_info.ScratchDataSizeInBytes, compact_vk_sizes.buildScratchSize)) ``` to this. `_Right$` is meant to hold the inner result, but nothing in `main` stores it under that name. It shares its stack slot with `tv7896`, the saved `vkDestroyDevice` pointer. The code loads that pointer and reads the first eight bytes of the function as the size: ``` lea rax, QWORD PTR tlas_info$65[rbp-248] cmp QWORD PTR tlas_info$65[rbp-248], rcx cmovb rax, QWORD PTR _Right$[rbp-256] mov rdx, QWORD PTR [rax] ``` That value is not a size, so `arena_allocate` refused it for being larger than the arena. The message prints the size through `int(Width / 1024)`, so `105903` may be truncated. The fix takes the maximum of the three values with one `std::max` over a list (and includes `<algorithm>` for it). The layer and the arena allocator are unchanged. Nothing is skipped. ### Tested Windows 11, MSVC 19.52.37029 (`RelWithDebInfo`). After the rebase on `main` 6293c1c4 (`d6b40a0a`, same patch as `2bd79535`). The head is now `f4fc7623` on 58be9cdf, with the same patch; `runtime/` on `main` did not change between the two, so these were not rerun: - With the test source from `main`, both tests fail with `arena full ... buffer size in KiB: 105903`. With this commit both pass, 4 runs out of 4. - Full `ctest -j 1 --timeout 300`: 259 passed, 1 failed, 12 skipped, `gameinput` disabled. The failure is `d3d12_execute_indirect_validation`, also failing in the first run below (#1066 is open for it). The skipped tests are the 12 listed below. - The XMA2 decoder was not built on this PC (its cargo step failed), so the CI link error fixed by #877 was not reproduced here. First run, on `main` a2892784: - Before: both tests fail as above, and the failure repeats on every run. After: both pass. With `LEONIDA_ARENA_LOG=1` the first allocation after the RT buffers is `0x600` bytes, as expected. - The unmodified test source compiled with the 14.51 toolset (19.51.36263) and linked with the same libraries passes on the same GPU; its listing has no such `cmovb`. Compiled with 14.52 and linked the same way, it fails. Adding only a `printf` of the values after the calculation also made the 14.52 build pass, so the failure depends on the surrounding code. - The listings of the five `gta6rt_d3d12_com` sources, built with the same flags, have no `cmov` from a `_Left$`/`_Right$` slot that is never stored. - Both tests were rebuilt and rerun after adding `<algorithm>`: pass. - Full `ctest -j 1 --timeout 300`: 257 passed, 1 failed, 12 skipped (the log of the baseline f3e26be7: 255 passed, 3 failed, 12 skipped). The only failure is `d3d12_execute_indirect_validation`, which also fails in the baseline and is known (#306, #749). Every other result is unchanged. Skipped, as in the baseline (the run predates the `<algorithm>` line): `shader_library_corpus`, `bink_decode`, `bink_abi`, `bink_play_headless`, `fsr_dispatch`, `bvh_builder`, `bink_audio`, `vk_sync_validation`, `d3d12_sparse_queue_family_contract`, `d3d12_rgb9e5_rtv`, `d3d12_boot_movie`, `d3d12_first_light`. Disabled: `gameinput`. - `git diff --check` and `python -I scripts/check_no_game_data.py runtime/test/d3d12_indirect_rt_test.cpp`: clean. - #444 (a902c78a) and #710 (296508e1) each merge onto this commit without conflicts. Neither changes this calculation. Those merged trees were not built. No CPU regression: the fault is in the code the compiler makes for this function, and a small standalone copy of the calculation, built with the same options, does not reproduce it. With GPU-assisted validation on, the RayQueryKHR check misses on `main` and on this branch alike, with four `VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281` reports; #710 describes the same result and covers the addresses. It is a separate topic and was not rerun here. Not covered: the parts of these tests that need `glslangValidator` (the drawing and `RayQueryKHR` checks) are not built on this PC, the validation layer was off, GCC and Clang were not used. Whether other MSVC 14.52 builds have the same fault elsewhere was only checked in the files above. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.24, Windows 11 AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:30:10 +00:00
github manually merged commit f4fc7623c0 into gh-pr/954/base 2026-11-26 09:30:14 +00:00
Author
Owner

@⁠sodove on GitHub · 2026-11-24 15:53 UTC · original

Independent Windows check against parent a28927849 and PR head 2bd795357. Both d3d12_indirect_rt and d3d12_indirect_rt_upload_sysmem passed on both revisions with MSVC 19.44.35220, RelWithDebInfo, Windows 11 26100.7623, NVIDIA RTX 5070 Ti (610.74).

Both memory modes exercised BLAS clone and compaction. Each reported a compacted size of 1,152 bytes and the ray query produced one hit and one miss on both revisions. Core and synchronization validation were active, both test modes reported zero validation errors, and the validation self-test passed. This covers the older compiler. The 19.52-specific failure remains covered by the author's run.

Synthetic inputs only. AI-assisted: OpenAI Codex.

**@⁠sodove** on GitHub · 2026-11-24 15:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/954#issuecomment-7136772631) Independent Windows check against parent `a28927849` and PR head `2bd795357`. Both `d3d12_indirect_rt` and `d3d12_indirect_rt_upload_sysmem` passed on both revisions with MSVC 19.44.35220, RelWithDebInfo, Windows 11 26100.7623, NVIDIA RTX 5070 Ti (610.74). Both memory modes exercised BLAS clone and compaction. Each reported a compacted size of 1,152 bytes and the ray query produced one hit and one miss on both revisions. Core and synchronization validation were active, both test modes reported zero validation errors, and the validation self-test passed. This covers the older compiler. The 19.52-specific failure remains covered by the author's run. Synthetic inputs only. AI-assisted: OpenAI Codex.
Author
Owner

@⁠Timon360SB on GitHub · 2026-11-24 17:49 UTC · original

Independent testing results

Tested the indirect ray tracing scratch-size change on NVIDIA Blackwell hardware with Vulkan validation enabled.

Both BASE and HEAD exhibit a reproducible RayQueryKHR failure with matching acceleration structure validation diagnostics.

Tested revisions

  • BASE: a28927849adb4e40dfdec8c32fb6758dcd205a37
  • HEAD: 2bd795357da1b7a2a4215873aa32f64279f8d530

Test environment

Component Configuration
CPU AMD Ryzen 7 7800X3D
GPU NVIDIA GeForce RTX 5070 (Blackwell)
VRAM 12227 MiB
RAM 31.11 GiB
GPU driver 621.14
OS Windows 11 Pro, build 26200
Vulkan SDK 1.4.363.0
MSVC 19.44.35230
Windows SDK 10.0.26100.0
Resizable BAR Enabled

Test configuration

  • RelWithDebInfo, Ninja Multi-Config.
  • Selected CTest targets.
  • Vulkan core, GPU-assisted and synchronization validation enabled.
  • Three repetitions per revision per attempt.
  • Three independent queue attempts.
  • Existing compatible builds reused where available.

Both revisions compiled successfully.

Execution logs and run timestamps confirm that tests were executed again during subsequent attempts.

CTest results

Test BASE HEAD
d3d12_indirect_rt 0/9 0/9
d3d12_indirect_rt_upload_sysmem 0/9 0/9
vk_sync_validation 9/9 9/9
Total PASS 9/27 9/27
Status BASE HEAD Combined
PASS 9 9 18
FAIL 18 18 36
SKIP 0 0 0
Total 27 27 54

All 18 CTest process invocations completed with exit code 8 due to the indirect RT test failures.

RayQueryKHR failure

Both indirect RT test variants consistently reported:

FAIL: RayQueryKHR ARRAY expected hit=1 miss=0, got hit=0 miss=0
Ray query result Expected Actual
Hit 1 0
Miss 0 0

The failure reproduced in all 36 executions of the two indirect RT tests across BASE and HEAD.

Acceleration structure validation

The failing tests reported:

VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281

Representative diagnostic:

validation: vkCmdBuildAccelerationStructuresKHR():
pInfos[0].pGeometries[0].geometry.instances<VkAccelerationStructureInstance>[0].accelerationStructureReference (0xce80000) is an invalid acceleration structure reference.

The validation layer reports invalid acceleration structure references in the instance geometry passed to vkCmdBuildAccelerationStructuresKHR.

Property BASE HEAD
Indirect RT test failures 18 18
Occurrences of VUID-pInfos-12281 72 72
VUID occurrences per failing test 4 4

The same diagnostic category and functional failure were present on both revisions.

The exact root cause of the invalid acceleration structure references was not established during this verification.

Upload heap configurations

The failure reproduced with both upload heap configurations:

  • VRAM using DEVICE_LOCAL | HOST_VISIBLE memory with Resizable BAR.
  • System memory using LEONIDA_UPLOAD_SYSMEM.

Consequently, the observed failure was not limited to the VRAM upload heap configuration.

Successful subchecks

Despite the overall indirect RT test failures, the following subchecks passed consistently:

[PASS] ExecuteIndirect with suballocated argument and count buffers (count=0 skipped, count=1 rendered)
[PASS] KHR COMPACTED_SIZE postbuild (inline=1152, emit2=[1152, 1152])

The recorded compaction size results remained identical between BASE and HEAD.

No scratch-buffer GPU address arena exhaustion diagnostic matching the original reported failure was identified in the examined logs.

Compiler-specific limitation

The compiler used here was MSVC 19.44.35230.

This differs from MSVC 19.52.37029, which is associated with the nested std::max miscompilation addressed by this PR.

Therefore, these results do not independently reproduce or confirm the original compiler-specific fix.

Synchronization validation

All vk_sync_validation executions passed.

The expected intentional WRITE_AFTER_WRITE hazard without a barrier and zero errors with a barrier were observed consistently.

Conclusion

Result: FAIL on both revisions — no new failure introduced by HEAD was identified in the tested scenarios.

The indirect ray tracing tests consistently failed on both BASE and HEAD due to a RayQueryKHR output mismatch accompanied by invalid acceleration structure reference validation diagnostics.

The original compiler-specific scratch-size issue could not be independently verified with this MSVC version.

The acceleration structure reference issue appears to warrant separate investigation. Testing with the affected MSVC 19.52 toolchain would be required to directly verify the intended fix.

Testing was limited to one NVIDIA GPU, synthetic fixtures and validation-enabled execution. No real-title testing was performed.

AI-assisted log analysis and report preparation.

**@⁠Timon360SB** on GitHub · 2026-11-24 17:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/954#issuecomment-7139747319) ## Independent testing results Tested the indirect ray tracing scratch-size change on NVIDIA Blackwell hardware with Vulkan validation enabled. Both BASE and HEAD exhibit a reproducible RayQueryKHR failure with matching acceleration structure validation diagnostics. ### Tested revisions - BASE: `a28927849adb4e40dfdec8c32fb6758dcd205a37` - HEAD: `2bd795357da1b7a2a4215873aa32f64279f8d530` ### Test environment | Component | Configuration | | --- | --- | | CPU | AMD Ryzen 7 7800X3D | | GPU | NVIDIA GeForce RTX 5070 (Blackwell) | | VRAM | 12227 MiB | | RAM | 31.11 GiB | | GPU driver | 621.14 | | OS | Windows 11 Pro, build 26200 | | Vulkan SDK | 1.4.363.0 | | MSVC | 19.44.35230 | | Windows SDK | 10.0.26100.0 | | Resizable BAR | Enabled | ### Test configuration - RelWithDebInfo, Ninja Multi-Config. - Selected CTest targets. - Vulkan core, GPU-assisted and synchronization validation enabled. - Three repetitions per revision per attempt. - Three independent queue attempts. - Existing compatible builds reused where available. Both revisions compiled successfully. Execution logs and run timestamps confirm that tests were executed again during subsequent attempts. ### CTest results | Test | BASE | HEAD | | --- | ---: | ---: | | `d3d12_indirect_rt` | 0/9 | 0/9 | | `d3d12_indirect_rt_upload_sysmem` | 0/9 | 0/9 | | `vk_sync_validation` | 9/9 | 9/9 | | **Total PASS** | **9/27** | **9/27** | | Status | BASE | HEAD | Combined | | --- | ---: | ---: | ---: | | PASS | 9 | 9 | 18 | | FAIL | 18 | 18 | 36 | | SKIP | 0 | 0 | 0 | | **Total** | **27** | **27** | **54** | All 18 CTest process invocations completed with exit code 8 due to the indirect RT test failures. ### RayQueryKHR failure Both indirect RT test variants consistently reported: ```text FAIL: RayQueryKHR ARRAY expected hit=1 miss=0, got hit=0 miss=0 ``` | Ray query result | Expected | Actual | | --- | ---: | ---: | | Hit | 1 | 0 | | Miss | 0 | 0 | The failure reproduced in all 36 executions of the two indirect RT tests across BASE and HEAD. ### Acceleration structure validation The failing tests reported: `VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281` Representative diagnostic: ```text validation: vkCmdBuildAccelerationStructuresKHR(): pInfos[0].pGeometries[0].geometry.instances<VkAccelerationStructureInstance>[0].accelerationStructureReference (0xce80000) is an invalid acceleration structure reference. ``` The validation layer reports invalid acceleration structure references in the instance geometry passed to `vkCmdBuildAccelerationStructuresKHR`. | Property | BASE | HEAD | | --- | ---: | ---: | | Indirect RT test failures | 18 | 18 | | Occurrences of VUID-pInfos-12281 | 72 | 72 | | VUID occurrences per failing test | 4 | 4 | The same diagnostic category and functional failure were present on both revisions. The exact root cause of the invalid acceleration structure references was not established during this verification. ### Upload heap configurations The failure reproduced with both upload heap configurations: - VRAM using `DEVICE_LOCAL | HOST_VISIBLE` memory with Resizable BAR. - System memory using `LEONIDA_UPLOAD_SYSMEM`. Consequently, the observed failure was not limited to the VRAM upload heap configuration. ### Successful subchecks Despite the overall indirect RT test failures, the following subchecks passed consistently: ```text [PASS] ExecuteIndirect with suballocated argument and count buffers (count=0 skipped, count=1 rendered) [PASS] KHR COMPACTED_SIZE postbuild (inline=1152, emit2=[1152, 1152]) ``` The recorded compaction size results remained identical between BASE and HEAD. No scratch-buffer GPU address arena exhaustion diagnostic matching the original reported failure was identified in the examined logs. ### Compiler-specific limitation The compiler used here was MSVC 19.44.35230. This differs from MSVC 19.52.37029, which is associated with the nested `std::max` miscompilation addressed by this PR. Therefore, these results do not independently reproduce or confirm the original compiler-specific fix. ### Synchronization validation All `vk_sync_validation` executions passed. The expected intentional `WRITE_AFTER_WRITE` hazard without a barrier and zero errors with a barrier were observed consistently. ### Conclusion **Result: FAIL on both revisions — no new failure introduced by HEAD was identified in the tested scenarios.** The indirect ray tracing tests consistently failed on both BASE and HEAD due to a RayQueryKHR output mismatch accompanied by invalid acceleration structure reference validation diagnostics. The original compiler-specific scratch-size issue could not be independently verified with this MSVC version. The acceleration structure reference issue appears to warrant separate investigation. Testing with the affected MSVC 19.52 toolchain would be required to directly verify the intended fix. Testing was limited to one NVIDIA GPU, synthetic fixtures and validation-enabled execution. No real-title testing was performed. AI-assisted log analysis and report preparation.
Author
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 19:45 UTC · original

Rebased on main 6293c1c4: the head is now d6b40a0a, with the same patch as 2bd79535 (git range-diff reports it unchanged).

CI. The failed run built this branch on a28927849, and both failures come from that base:

  • windows stopped at the gta6rt.exe link: leonida_xma2_decoder.lib had unresolved WaitOnAddress/WakeByAddress*. #877 adds synchronization to its libraries.
  • linux-gpu-tools failed cs_imgload_tfe and cs_imgload_d16_tfe. #892 corrects those two fixtures.

Both are in the new base. The new CI run has not finished, so this is read from the logs and those changes.

@⁠Timon360SB's report (thanks). The RayQueryKHR miss and the four VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281 reports are the same on the base and on this branch, and #710 describes the same result under GPU-assisted validation on main: the layer replaces the instance's BLAS with its dummy one, so the ray misses. #710 changes how arena acceleration structures get their addresses, and says the RayQueryKHR check still misses under GPU-AV with it. I left that out of this pull request, which only changes the test's scratch-size calculation. I did not rerun GPU-AV.

Rerun on Windows 11, MSVC 19.52.37029 (RelWithDebInfo), RTX 3080, driver 621.24, on the new base:

  • With the test source from main: both d3d12_indirect_rt and d3d12_indirect_rt_upload_sysmem fail with arena full ... buffer size in KiB: 105903.
  • With this commit: both pass, 4 runs out of 4.
  • Full ctest -j 1 --timeout 300: 259 passed, 1 failed, 12 skipped. The failure is d3d12_execute_indirect_validation, which #1066 addresses.
  • The XMA2 decoder was not built here, so the link fix was not exercised locally.

AI-assisted: yes (Claude Code).

**@⁠TheGeogeo** on GitHub · 2026-11-24 19:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/954#issuecomment-7142548766) Rebased on `main` 6293c1c4: the head is now `d6b40a0a`, with the same patch as `2bd79535` (`git range-diff` reports it unchanged). **CI.** The failed run built this branch on `a28927849`, and both failures come from that base: - `windows` stopped at the `gta6rt.exe` link: `leonida_xma2_decoder.lib` had unresolved `WaitOnAddress`/`WakeByAddress*`. #877 adds `synchronization` to its libraries. - `linux-gpu-tools` failed `cs_imgload_tfe` and `cs_imgload_d16_tfe`. #892 corrects those two fixtures. Both are in the new base. The new CI run has not finished, so this is read from the logs and those changes. **@⁠Timon360SB's report** (thanks). The RayQueryKHR miss and the four `VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281` reports are the same on the base and on this branch, and #710 describes the same result under GPU-assisted validation on `main`: the layer replaces the instance's BLAS with its dummy one, so the ray misses. #710 changes how arena acceleration structures get their addresses, and says the RayQueryKHR check still misses under GPU-AV with it. I left that out of this pull request, which only changes the test's scratch-size calculation. I did not rerun GPU-AV. **Rerun** on Windows 11, MSVC 19.52.37029 (`RelWithDebInfo`), RTX 3080, driver 621.24, on the new base: - With the test source from `main`: both `d3d12_indirect_rt` and `d3d12_indirect_rt_upload_sysmem` fail with `arena full ... buffer size in KiB: 105903`. - With this commit: both pass, 4 runs out of 4. - Full `ctest -j 1 --timeout 300`: 259 passed, 1 failed, 12 skipped. The failure is `d3d12_execute_indirect_validation`, which #1066 addresses. - The XMA2 decoder was not built here, so the link fix was not exercised locally. AI-assisted: yes (Claude Code).
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 20:44 UTC · original

Merging.

Why merged: TEST-INDIRECT-RT-ARENA: d3d12_indirect_rt_test replaces a nested std::max with an initializer-list std::max to work around an MSVC 19.52 miscompile. It's 6 lines. sodove passed both revisions, and the current head is a content-identical rebase.

Why it's good: indirect_rt and indirect_rt_upload_sysmem: PASS with 0 validation errors, and the RayQuery got hit=1 here under validation. Timon360SB's hit=0 on a 5070 with GPU-assisted validation shows up on the base too, so it isn't this PR.

Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d9698 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d9698 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠QemmHD** on GitHub · 2026-11-24 20:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/954#issuecomment-7143994324) Merging. **Why merged:** TEST-INDIRECT-RT-ARENA: d3d12_indirect_rt_test replaces a nested std::max with an initializer-list std::max to work around an MSVC 19.52 miscompile. It's 6 lines. sodove passed both revisions, and the current head is a content-identical rebase. **Why it's good:** indirect_rt and indirect_rt_upload_sysmem: PASS with 0 validation errors, and the RayQuery got hit=1 here under validation. Timon360SB's hit=0 on a 5070 with GPU-assisted validation shows up on the base too, so it isn't this PR. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d9698 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d9698 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.