vk_pipeline_check: choose robustBufferAccess and VK_EXT_robustness2 as the runtime does (RT-PIPELINE-CHECK-ROBUSTNESS) #1833

Open
github-bot wants to merge 1 commit from github-bot/gh-1833 into main AGit
Owner

@⁠adrianmjim on GitHub · 2026-11-25 12:48 UTC · original
adrianmjim:fix/pipeline-check-robustness → main · +59 −7 · 2 files · 1 commits · open

Claimed in the coordination issue as: RT-PIPELINE-CHECK-ROBUSTNESS (#1608)

Depends on: none. It touches the same lines of vk_pipeline_check.cpp as #1630's transform-feedback line, so whichever lands second needs a trivial rebase.

What and why

pipeline_cache_seed fails on main on an AMD Radeon RX 7900 XT:

FAIL: vk_pipeline_check cache does not hit on the runtime's device (AMD Radeon RX 7900 XT), which does hit a cache it wrote itself: vk_pipeline_check's device differs from the runtime's in something the driver makes part of a pipeline's cache key

#1723 (ba626820e) made the runtime's device enable, where supported:

  • robustBufferAccess together with VK_EXT_robustness2's robustBufferAccess2, for bounded indexed indirect draws (leonida::can_enable_robust_index_view, with maintenance5);
  • nullDescriptor, wherever it is offered.

vk_pipeline_check still forced robustBufferAccess off and never enabled VK_EXT_robustness2. AMD makes robust buffer access part of a pipeline's cache key, so the cache the checker saves no longer hits in gta6rt.

The change: the checker now makes the same choice the runtime does, with the same helper and the same inputs.

  • It queries VK_EXT_robustness2 (and maintenance5) and decides nullDescriptor and the robust index view as create_vulkan_device_standalone does.
  • It chains VK_EXT_robustness2 (and maintenance5) only when one of them is used.
  • After the general feature query it keeps only those choices: robustBufferAccess and robustBufferAccess2 follow the robust index view, nullDescriptor is as decided, and robustImageAccess2 is off.

docs/pipeline_check.md ("The cache and the runtime's device") says so.

Tested

AMD Radeon RX 7900 XT (RDNA3), AMD driver 32.0.32029.2010 (26.11.2), no Resizable BAR, Windows 11 build 26300, VS 2022 (MSVC 19.44) RelWithDebInfo, on main 0d80bc5df:

  • pipeline_cache_seed: 3 of 3 pass with the change, and 3 of 3 fail without it (the same build with only vk_pipeline_check rebuilt from main's file). It also passes under LEONIDA_VK_VALIDATION=1 with no VUIDs.
  • What matters: in a local experiment, mirroring nullDescriptor alone still missed. Adding robustBufferAccess and robustBufferAccess2 hit, with or without maintenance5.
  • The checker's tests: vk_pipeline_check_cli, vk_pipeline_check_stack, pipeline_cache_snapshot and the other pipeline_check/pipeline_cache tests, 8 of 8 pass.
  • Whole ctest -j 6: 437 of 439 pass or skip. The two failures, d3d12_texture_tiles (#964) and d3d12_clear, fail on main here too. That run was on a first revision of this change. The final one differs only inside the checker's robustness block (where an #ifdef sits, and the update-after-bind input), and I re-ran pipeline_cache_seed (3 of 3) and the checker and cache tests on it.

Not run on NVIDIA or Intel. Where the runtime makes the other choice, the checker now makes it too.

GPUs tested: AMD Radeon RX 7900 XT (RDNA3), AMD 32.0.32029.2010, Windows 11 26300

AI-assisted: yes

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. (No translator change.)
**@⁠adrianmjim** on GitHub · 2026-11-25 12:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833) `adrianmjim:fix/pipeline-check-robustness` → `main` · +59 −7 · 2 files · 1 commits · open Claimed in the coordination issue as: RT-PIPELINE-CHECK-ROBUSTNESS (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) Depends on: none. It touches the same lines of `vk_pipeline_check.cpp` as #1630's transform-feedback line, so whichever lands second needs a trivial rebase. ### What and why `pipeline_cache_seed` fails on `main` on an AMD Radeon RX 7900 XT: ``` FAIL: vk_pipeline_check cache does not hit on the runtime's device (AMD Radeon RX 7900 XT), which does hit a cache it wrote itself: vk_pipeline_check's device differs from the runtime's in something the driver makes part of a pipeline's cache key ``` #1723 (`ba626820e`) made the runtime's device enable, where supported: - `robustBufferAccess` together with `VK_EXT_robustness2`'s `robustBufferAccess2`, for bounded indexed indirect draws (`leonida::can_enable_robust_index_view`, with `maintenance5`); - `nullDescriptor`, wherever it is offered. `vk_pipeline_check` still forced `robustBufferAccess` off and never enabled `VK_EXT_robustness2`. AMD makes robust buffer access part of a pipeline's cache key, so the cache the checker saves no longer hits in gta6rt. The change: the checker now makes the same choice the runtime does, with the same helper and the same inputs. - It queries `VK_EXT_robustness2` (and `maintenance5`) and decides `nullDescriptor` and the robust index view as `create_vulkan_device_standalone` does. - It chains `VK_EXT_robustness2` (and `maintenance5`) only when one of them is used. - After the general feature query it keeps only those choices: `robustBufferAccess` and `robustBufferAccess2` follow the robust index view, `nullDescriptor` is as decided, and `robustImageAccess2` is off. `docs/pipeline_check.md` ("The cache and the runtime's device") says so. ### Tested AMD Radeon RX 7900 XT (RDNA3), AMD driver 32.0.32029.2010 (26.11.2), no Resizable BAR, Windows 11 build 26300, VS 2022 (MSVC 19.44) RelWithDebInfo, on `main` `0d80bc5df`: - **`pipeline_cache_seed`:** 3 of 3 pass with the change, and 3 of 3 fail without it (the same build with only `vk_pipeline_check` rebuilt from `main`'s file). It also passes under `LEONIDA_VK_VALIDATION=1` with no VUIDs. - **What matters:** in a local experiment, mirroring `nullDescriptor` alone still missed. Adding `robustBufferAccess` and `robustBufferAccess2` hit, with or without `maintenance5`. - **The checker's tests:** `vk_pipeline_check_cli`, `vk_pipeline_check_stack`, `pipeline_cache_snapshot` and the other `pipeline_check`/`pipeline_cache` tests, 8 of 8 pass. - **Whole `ctest -j 6`:** 437 of 439 pass or skip. The two failures, `d3d12_texture_tiles` (#964) and `d3d12_clear`, fail on `main` here too. That run was on a first revision of this change. The final one differs only inside the checker's robustness block (where an `#ifdef` sits, and the update-after-bind input), and I re-ran `pipeline_cache_seed` (3 of 3) and the checker and cache tests on it. Not run on NVIDIA or Intel. Where the runtime makes the other choice, the checker now makes it too. GPUs tested: AMD Radeon RX 7900 XT (RDNA3), AMD 32.0.32029.2010, Windows 11 26300 AI-assisted: yes ### 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. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No translator change.)
Since ba626820e (#1723) the runtime's device enables robustBufferAccess
with VK_EXT_robustness2's robustBufferAccess2 for bounded indexed
indirect draws (leonida::can_enable_robust_index_view, with
maintenance5), and nullDescriptor wherever robustness2 offers it. The
checker still forced robustBufferAccess off and never enabled
robustness2. AMD makes robust buffer access part of a pipeline's cache
key, so the cache the checker saves stopped hitting in gta6rt:
pipeline_cache_seed fails on an RX 7900 XT.

The checker now makes the same choice with the same helper, chains
robustness2 and maintenance5 only when one of them is used, and after
the general feature query keeps only those choices. A buffer
update-after-bind feature it enables also asks the helper for
robustBufferAccessUpdateAfterBind, so its own device stays valid.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:07:39 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 13:06 UTC · original · reviewed

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

2 open issues
What changed in this PR

Aligns vk_pipeline_check device feature/extension selection with the runtime to avoid Vulkan pipeline cache key mismatches (notably on AMD where robust buffer access affects the cache key).

Changes:

  • Mirrors the runtime’s decisions for robustBufferAccess, VK_EXT_robustness2 (robustBufferAccess2, nullDescriptor), and (conditionally) VK_KHR_maintenance5.
  • Updates the checker’s post-query feature overrides so only the runtime-matching robustness bits remain enabled.
  • Documents the robustness/keying behavior and the runtime parity requirement.
File Description
runtime/​test/​vk_pipeline_check.cpp Adds runtime-parity robustness2/maintenance5 probing and applies matching feature enables to keep pipeline cache keys consistent.
docs/​pipeline_check.md Updates documentation to describe the runtime/checker alignment for robustness-related cache key behavior.

Review effort: Lite

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-25 13:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#pullrequestreview-6058155565) · **reviewed** > [!WARNING] > Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a `copilot-code-review.yml` file specifying one with the `runs-on` attribute. See the [docs](https://gh.io/AA11tgch) for more details. <!-- ccr-overview-v2 --> ## Copilot review overview <details open> <summary><strong>2 open issues</strong></summary> - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-light.png" alt="High severity" width="62" height="18" align="texttop"></picture> [This is intended to mirror the runtime’s input to `can_enable_robust_index_view`, but it currently…](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/1833) · New - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture> [The inline comment is hard to parse and includes an incomplete VUID reference (`VUID-...`). Please…](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/1833) · New </details> <details> <summary><strong>What changed in this PR</strong></summary> Aligns `vk_pipeline_check` device feature/extension selection with the runtime to avoid Vulkan pipeline cache key mismatches (notably on AMD where robust buffer access affects the cache key). **Changes:** - Mirrors the runtime’s decisions for `robustBufferAccess`, `VK_EXT_robustness2` (`robustBufferAccess2`, `nullDescriptor`), and (conditionally) `VK_KHR_maintenance5`. - Updates the checker’s post-query feature overrides so only the runtime-matching robustness bits remain enabled. - Documents the robustness/keying behavior and the runtime parity requirement. | File | Description | | ---- | ----------- | | runtime/​test/​vk_pipeline_check.cpp | Adds runtime-parity robustness2/maintenance5 probing and applies matching feature enables to keep pipeline cache keys consistent. | | docs/​pipeline_check.md | Updates documentation to describe the runtime/checker alignment for robustness-related cache key behavior. | </details> <sub>Review effort: Lite</sub>
@ -1147,0 +1175,4 @@
// supported update-after-bind feature, so any buffer one asks for the property (VUID-...-robustBufferAccess-10247).
q12.descriptorBindingUniformBufferUpdateAfterBind || q12.descriptorBindingStorageBufferUpdateAfterBind ||
q12.descriptorBindingUniformTexelBufferUpdateAfterBind ||
q12.descriptorBindingStorageTexelBufferUpdateAfterBind);
Author
Owner

@⁠Copilot on GitHub · 2026-11-25 13:06 UTC · original

This is intended to mirror the runtime’s input to can_enable_robust_index_view, but it currently passes uniform || storage || texel update-after-bind support. The PR description/comment says the runtime passes the storage-buffer update-after-bind choice; using an OR here can yield a different robust_index_view decision than the runtime (and therefore reintroduce a pipeline cache key mismatch). Pass the same single boolean that the runtime uses (storage-buffer UAB), or plumb the checker’s actual chosen bindless/UAB enable decision rather than OR’ing multiple supported bits.

**@⁠Copilot** on GitHub · 2026-11-25 13:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#discussion_r4695324747) This is intended to mirror the runtime’s input to `can_enable_robust_index_view`, but it currently passes `uniform || storage || texel` update-after-bind support. The PR description/comment says the runtime passes the *storage-buffer update-after-bind* choice; using an OR here can yield a different `robust_index_view` decision than the runtime (and therefore reintroduce a pipeline cache key mismatch). Pass the same single boolean that the runtime uses (storage-buffer UAB), or plumb the checker’s actual chosen bindless/UAB enable decision rather than OR’ing multiple supported bits.
@ -1147,0 +1172,4 @@
pd, vkGetPhysicalDeviceProperties2, sized_indirect,
query.features.robustBufferAccess && robustness2.robustBufferAccess2,
// The runtime passes its bindless choice (storage-buffer update-after-bind); this device enables every
// supported update-after-bind feature, so any buffer one asks for the property (VUID-...-robustBufferAccess-10247).
Author
Owner

@⁠Copilot on GitHub · 2026-11-25 13:06 UTC · original

The inline comment is hard to parse and includes an incomplete VUID reference (VUID-...). Please tighten the wording (the current sentence fragment reads ungrammatically) and either cite the full VUID ID or remove it, so future readers can understand the exact validation concern and why this boolean is computed this way.

**@⁠Copilot** on GitHub · 2026-11-25 13:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#discussion_r4695324836) The inline comment is hard to parse and includes an incomplete VUID reference (`VUID-...`). Please tighten the wording (the current sentence fragment reads ungrammatically) and either cite the full VUID ID or remove it, so future readers can understand the exact validation concern and why this boolean is computed this way.
Author
Owner

@⁠Mby159 on GitHub · 2026-11-25 13:14 UTC · original

AMD Radeon 780M (RDNA3): main's checker diverges from the runtime's robustness choice, with a cache-key measurement

I could not run pipeline_cache_seed on this machine (no MSVC or Windows SDK here - the test links gta6rt_d3d12_com), so this is a device-feature measurement plus a cache-key measurement with vk_pipeline_check, not a run of the test itself. The device is an AMD Radeon 780M Graphics (RDNA3, PCI\VEN_1002&DEV_1900), Windows driver 32.0.32015.12012, Vulkan apiVersion 1.4.359, props.driverVersion 2.0.416.

The runtime's device enables robustness here, so main (0d80bc5df) still differs from the runtime on this GPU. Querying the features the way create_vulkan_device_standalone queries them: VK_EXT_robustness2 and VK_KHR_maintenance5 are advertised (the maintenance5 feature is on), core robustBufferAccess and drawIndirectFirstInstance are on, robustBufferAccess2 and nullDescriptor are on, runtimeDescriptorArray, shaderSampledImageArrayDynamicIndexing, shaderStorageImageArrayDynamicIndexing and the sampled-image/storage-image/storage-buffer update-after-bind features are on (so the runtime's info.bindless is on), and robustBufferAccessUpdateAfterBind (Vulkan 1.2 property) is on. leonida::can_enable_robust_index_view(...) with the runtime's inputs therefore returns true here, so the runtime's device enables robustBufferAccess together with robustBufferAccess2, plus nullDescriptor where it is offered. With this PR's change the checker makes the same robustness choice on this device; on main the checker still forces robustBufferAccess off and never enables VK_EXT_robustness2.

Cache-key measurement. Four builds of runtime/test/vk_pipeline_check.cpp, one synthetic minimal compute SPIR-V and index.json (the same pair runtime/test/check_pipeline_cache_seed.cmake feeds the checker), and --jobs 1 --cache-feedback:

  • main (0d80bc5df): robustness off (core robustBufferAccess forced off, no VK_EXT_robustness2).
  • main + core robustBufferAccess on only, no VK_EXT_robustness2 (a local one-line patch of main).
  • this PR's head (97fb9ee3) with the robust index view forced off: VK_EXT_robustness2 with nullDescriptor on, both robustBufferAccess bits off (a local patch of this PR).
  • this PR's head as it stands: core robustBufferAccess + robustBufferAccess2 + nullDescriptor, and VK_KHR_maintenance5 with the robust index view.

Each build was run as the same file name (pipeline_cache_seed_test.exe) in the same directory; one run writes the cache, the next is given that cache file and reports the VkPipelineCreationFeedback hits:

cache written by read by main (robustness off) read by main + core robustBufferAccess on read by robustness2 + nullDescriptor only read by this PR's configuration
main (robustness off) 1 hit 0 hits 0 hits 0 hits
main + core robustBufferAccess on 0 hits 1 hit 0 hits 0 hits
robustness2 + nullDescriptor only 0 hits 0 hits 1 hit 0 hits
this PR's configuration 0 hits 0 hits 0 hits 1 hit

Every build hits its own cache (the diagonal) and misses the others, so the mechanism works on this driver; the off-diagonal entries report "no hit reported". The whole matrix was run twice with the same result. The cache file is accepted in every case: in the main/PR pair it grows from 2412 to 4772 bytes after the cross-configuration read, and each configuration then hits only its own entry - the misses are a cache-key difference, not a rejected cache.

So on this driver, turning core robustBufferAccess on and nothing else changes the key, and enabling VK_EXT_robustness2 with nullDescriptor (both robustBufferAccess bits still off) changes it as well.

One difference in the inputs, from reading the code rather than measuring it: the runtime passes its info.bindless as the update-after-bind input to can_enable_robust_index_view, while this PR's checker passes "any of the four update-after-bind features is supported". On this device both are true, so it did not affect the measurement above. On a device where info.bindless is false while one of those four is supported and robustBufferAccessUpdateAfterBind is false, and where the sized-indirect and robust-access gates pass, the helper returns true for the runtime and false for the checker, and the two would still disagree.

Not covered here: pipeline_cache_seed itself, the validation layer, and anything but one AMD GPU and one driver version. The RX 7900 XT result in the PR description is the author's own run of pipeline_cache_seed; I did not reproduce that test here.

AI-assisted (MiniMax Code). No game files.

**@⁠Mby159** on GitHub · 2026-11-25 13:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#issuecomment-7163492778) **AMD Radeon 780M (RDNA3): `main`'s checker diverges from the runtime's robustness choice, with a cache-key measurement** I could not run `pipeline_cache_seed` on this machine (no MSVC or Windows SDK here - the test links `gta6rt_d3d12_com`), so this is a device-feature measurement plus a cache-key measurement with `vk_pipeline_check`, not a run of the test itself. The device is an AMD Radeon 780M Graphics (RDNA3, `PCI\VEN_1002&DEV_1900`), Windows driver 32.0.32015.12012, Vulkan apiVersion 1.4.359, `props.driverVersion` 2.0.416. **The runtime's device enables robustness here, so `main` (`0d80bc5df`) still differs from the runtime on this GPU.** Querying the features the way `create_vulkan_device_standalone` queries them: `VK_EXT_robustness2` and `VK_KHR_maintenance5` are advertised (the maintenance5 feature is on), core `robustBufferAccess` and `drawIndirectFirstInstance` are on, `robustBufferAccess2` and `nullDescriptor` are on, `runtimeDescriptorArray`, `shaderSampledImageArrayDynamicIndexing`, `shaderStorageImageArrayDynamicIndexing` and the sampled-image/storage-image/storage-buffer update-after-bind features are on (so the runtime's `info.bindless` is on), and `robustBufferAccessUpdateAfterBind` (Vulkan 1.2 property) is on. `leonida::can_enable_robust_index_view(...)` with the runtime's inputs therefore returns true here, so the runtime's device enables `robustBufferAccess` together with `robustBufferAccess2`, plus `nullDescriptor` where it is offered. With this PR's change the checker makes the same robustness choice on this device; on `main` the checker still forces `robustBufferAccess` off and never enables `VK_EXT_robustness2`. **Cache-key measurement.** Four builds of `runtime/test/vk_pipeline_check.cpp`, one synthetic minimal compute SPIR-V and `index.json` (the same pair `runtime/test/check_pipeline_cache_seed.cmake` feeds the checker), and `--jobs 1 --cache-feedback`: - `main` (`0d80bc5df`): robustness off (core `robustBufferAccess` forced off, no `VK_EXT_robustness2`). - `main` + core `robustBufferAccess` on only, no `VK_EXT_robustness2` (a local one-line patch of main). - this PR's head (`97fb9ee3`) with the robust index view forced off: `VK_EXT_robustness2` with `nullDescriptor` on, both `robustBufferAccess` bits off (a local patch of this PR). - this PR's head as it stands: core `robustBufferAccess` + `robustBufferAccess2` + `nullDescriptor`, and `VK_KHR_maintenance5` with the robust index view. Each build was run as the same file name (`pipeline_cache_seed_test.exe`) in the same directory; one run writes the cache, the next is given that cache file and reports the `VkPipelineCreationFeedback` hits: | cache written by | read by main (robustness off) | read by main + core robustBufferAccess on | read by robustness2 + nullDescriptor only | read by this PR's configuration | |---|---|---|---|---| | main (robustness off) | 1 hit | 0 hits | 0 hits | 0 hits | | main + core robustBufferAccess on | 0 hits | 1 hit | 0 hits | 0 hits | | robustness2 + nullDescriptor only | 0 hits | 0 hits | 1 hit | 0 hits | | this PR's configuration | 0 hits | 0 hits | 0 hits | 1 hit | Every build hits its own cache (the diagonal) and misses the others, so the mechanism works on this driver; the off-diagonal entries report "no hit reported". The whole matrix was run twice with the same result. The cache file is accepted in every case: in the main/PR pair it grows from 2412 to 4772 bytes after the cross-configuration read, and each configuration then hits only its own entry - the misses are a cache-key difference, not a rejected cache. So on this driver, turning core `robustBufferAccess` on and nothing else changes the key, and enabling `VK_EXT_robustness2` with `nullDescriptor` (both `robustBufferAccess` bits still off) changes it as well. **One difference in the inputs, from reading the code rather than measuring it:** the runtime passes its `info.bindless` as the update-after-bind input to `can_enable_robust_index_view`, while this PR's checker passes "any of the four update-after-bind features is supported". On this device both are true, so it did not affect the measurement above. On a device where `info.bindless` is false while one of those four is supported and `robustBufferAccessUpdateAfterBind` is false, and where the sized-indirect and robust-access gates pass, the helper returns true for the runtime and false for the checker, and the two would still disagree. Not covered here: `pipeline_cache_seed` itself, the validation layer, and anything but one AMD GPU and one driver version. The RX 7900 XT result in the PR description is the author's own run of `pipeline_cache_seed`; I did not reproduce that test here. AI-assisted (MiniMax Code). No game files.
Author
Owner

@⁠potatoe0100 on GitHub · 2026-11-25 13:50 UTC · original

NVIDIA data point: 97fb9ee3d merged onto main 98c2f7777 (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja.

  • pipeline_cache_seed passes with this PR, as it does on main here, so the robustness choice keeps the cache hitting on NVIDIA.
  • Full ctest -j 6: all pass apart from xmem_no_write_watch, which failed while another build was running on this PC; xmem failed the same way in the main run under that load. run_gpu_tests.py: 209/263, identical to main.

AI-assisted (Claude)

**@⁠potatoe0100** on GitHub · 2026-11-25 13:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#issuecomment-7164370550) NVIDIA data point: `97fb9ee3d` merged onto `main` `98c2f7777` (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja. - `pipeline_cache_seed` passes with this PR, as it does on `main` here, so the robustness choice keeps the cache hitting on NVIDIA. - Full `ctest -j 6`: all pass apart from `xmem_no_write_watch`, which failed while another build was running on this PC; `xmem` failed the same way in the `main` run under that load. `run_gpu_tests.py`: 209/263, identical to `main`. AI-assisted (Claude)
Author
Owner

@⁠BubsMcgee on GitHub · 2026-11-25 14:18 UTC · original

Potential high-severity gap in the robustness input, as Copilot flagged: the checker does not pass the same bindless choice the runtime passes.

The runtime (runtime/shims/d3d12_vulkan_device.cpp, create_vulkan_device_standalone) passes info.bindless, which is an AND:

runtimeDescriptorArray && shaderSampledImageArrayDynamicIndexing && shaderStorageImageArrayDynamicIndexing &&
descriptorBindingSampledImageUpdateAfterBind && descriptorBindingStorageImageUpdateAfterBind &&
descriptorBindingStorageBufferUpdateAfterBind

This checker passes an OR of descriptorBindingUniformBufferUpdateAfterBind, descriptorBindingStorageBufferUpdateAfterBind, descriptorBindingUniformTexelBufferUpdateAfterBind, descriptorBindingStorageTexelBufferUpdateAfterBind.

The OR can be true where info.bindless is false, e.g. a device that supports uniform/texel-buffer update-after-bind but not the sampled/storage-image UAB, or lacks runtimeDescriptorArray / dynamic indexing. The helper's last parameter is storage_update_after_bind, and when it is true the helper requires robustBufferAccessUpdateAfterBind. So on such a device, if that property is false, the checker chooses robust_index_view = false (robustBufferAccess off) while the runtime chooses true — the same class of cache-key mismatch this PR fixes.

The shared test device helper already does it correctly: runtime/test/vk_test_device.h:434 computes bindless with the same six-feature AND and passes that to can_enable_robust_index_view. The checker should do the same: compute that predicate from its queried features and pass it, rather than the OR. (The checker also enables every supported UAB feature, whereas the runtime enables only what info.bindless needs; for the device itself to match, it probably needs to mirror the runtime's UAB enable set too.)

On the 7900 XT both are true and robustBufferAccessUpdateAfterBind is true, so pipeline_cache_seed passes; the divergence is latent on devices where they differ. Worth correcting before treating #1833 as fully solving the AMD parity.

AI-assisted.

**@⁠BubsMcgee** on GitHub · 2026-11-25 14:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#issuecomment-7165083599) Potential high-severity gap in the robustness input, as Copilot flagged: the checker does not pass the same `bindless` choice the runtime passes. The runtime (`runtime/shims/d3d12_vulkan_device.cpp`, `create_vulkan_device_standalone`) passes `info.bindless`, which is an **AND**: ``` runtimeDescriptorArray && shaderSampledImageArrayDynamicIndexing && shaderStorageImageArrayDynamicIndexing && descriptorBindingSampledImageUpdateAfterBind && descriptorBindingStorageImageUpdateAfterBind && descriptorBindingStorageBufferUpdateAfterBind ``` This checker passes an **OR** of `descriptorBindingUniformBufferUpdateAfterBind`, `descriptorBindingStorageBufferUpdateAfterBind`, `descriptorBindingUniformTexelBufferUpdateAfterBind`, `descriptorBindingStorageTexelBufferUpdateAfterBind`. The OR can be true where `info.bindless` is false, e.g. a device that supports uniform/texel-buffer update-after-bind but not the sampled/storage-image UAB, or lacks `runtimeDescriptorArray` / dynamic indexing. The helper's last parameter is `storage_update_after_bind`, and when it is true the helper requires `robustBufferAccessUpdateAfterBind`. So on such a device, if that property is false, the checker chooses `robust_index_view = false` (robustBufferAccess off) while the runtime chooses true — the same class of cache-key mismatch this PR fixes. The shared test device helper already does it correctly: `runtime/test/vk_test_device.h:434` computes `bindless` with the same six-feature AND and passes that to `can_enable_robust_index_view`. The checker should do the same: compute that predicate from its queried features and pass it, rather than the OR. (The checker also enables every supported UAB feature, whereas the runtime enables only what `info.bindless` needs; for the device itself to match, it probably needs to mirror the runtime's UAB enable set too.) On the 7900 XT both are true and `robustBufferAccessUpdateAfterBind` is true, so `pipeline_cache_seed` passes; the divergence is latent on devices where they differ. Worth correcting before treating #1833 as fully solving the AMD parity. AI-assisted.
Author
Owner

@⁠BubsMcgee on GitHub · 2026-11-25 15:35 UTC · original

Concrete patch for the OR-vs-AND gap, on top of your branch so it is easy to take:

Branch: BubsMcgee/leonida:fix-1833-bindless (head 3e45ed067, based on main b0f3d3998 + your 5894f9324). The only change is the last argument to can_enable_robust_index_view in runtime/test/vk_pipeline_check.cpp: replace the OR of the four update-after-bind flags with the same predicate the runtime passes (VulkanDeviceInfo::bindless in create_vulkan_device_standalone, and already in runtime/test/vk_test_device.h:434):

q12.runtimeDescriptorArray && query.features.shaderSampledImageArrayDynamicIndexing &&
    query.features.shaderStorageImageArrayDynamicIndexing &&
    q12.descriptorBindingSampledImageUpdateAfterBind &&
    q12.descriptorBindingStorageImageUpdateAfterBind &&
    q12.descriptorBindingStorageBufferUpdateAfterBind

Why: the OR is true on a device that supports, say, uniform/texel-buffer update-after-bind but not the sampled/storage-image ones (or lacks runtimeDescriptorArray), where the runtime's bindless is false. The helper's last parameter is storage_update_after_bind; with the OR true and robustBufferAccessUpdateAfterBind false, the checker would disable robust_index_view while the runtime enables it, changing robustBufferAccess and the cache key again.

Tested on Windows 11 / RTX 3080 Ti (driver 616.64): pipeline_cache_seed, pipeline_cache_file, pipeline_cache_store, vk_pipeline_check_cli, vk_pipeline_check_stack, pipeline_cache_snapshot — 6/6 pass. On this GPU the OR and the AND agree (both true), so this is a no-regression check; the divergence needs a device where they differ.

AI-assisted.

**@⁠BubsMcgee** on GitHub · 2026-11-25 15:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1833#issuecomment-7167087436) Concrete patch for the OR-vs-AND gap, on top of your branch so it is easy to take: Branch: `BubsMcgee/leonida:fix-1833-bindless` (head `3e45ed067`, based on `main` `b0f3d3998` + your `5894f9324`). The only change is the last argument to `can_enable_robust_index_view` in `runtime/test/vk_pipeline_check.cpp`: replace the OR of the four update-after-bind flags with the same predicate the runtime passes (`VulkanDeviceInfo::bindless` in `create_vulkan_device_standalone`, and already in `runtime/test/vk_test_device.h:434`): ```cpp q12.runtimeDescriptorArray && query.features.shaderSampledImageArrayDynamicIndexing && query.features.shaderStorageImageArrayDynamicIndexing && q12.descriptorBindingSampledImageUpdateAfterBind && q12.descriptorBindingStorageImageUpdateAfterBind && q12.descriptorBindingStorageBufferUpdateAfterBind ``` Why: the OR is true on a device that supports, say, uniform/texel-buffer update-after-bind but not the sampled/storage-image ones (or lacks `runtimeDescriptorArray`), where the runtime's `bindless` is false. The helper's last parameter is `storage_update_after_bind`; with the OR true and `robustBufferAccessUpdateAfterBind` false, the checker would disable `robust_index_view` while the runtime enables it, changing `robustBufferAccess` and the cache key again. Tested on Windows 11 / RTX 3080 Ti (driver 616.64): `pipeline_cache_seed`, `pipeline_cache_file`, `pipeline_cache_store`, `vk_pipeline_check_cli`, `vk_pipeline_check_stack`, `pipeline_cache_snapshot` — 6/6 pass. On this GPU the OR and the AND agree (both true), so this is a no-regression check; the divergence needs a device where they differ. AI-assisted.
This pull request has changes conflicting with the target branch.
  • runtime/test/vk_pipeline_check.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1833/head:github-bot/gh-1833'
git switch 'github-bot/gh-1833'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1833'
git switch 'github-bot/gh-1833'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1833'
git switch 'github-bot/gh-1833'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1833'
git switch 'main'
git merge --squash 'github-bot/gh-1833'
git switch 'main'
git merge --ff-only 'github-bot/gh-1833'
git switch 'main'
git merge 'github-bot/gh-1833'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.