Repository navigation
Conversation
…ER-BUFFER-BOUNDS) A structured SRV used the typed index-only bounds mode, allowing a load beyond the end of one record to read the next. Select the same field-offset bounds mode as a structured UAV, consistent with five-star-recomp 3d287ab. Leave raw and typed views unchanged. Main plus the test failed at the first structured descriptor. The child passed both descriptor checks and all 128 structured and typed GPU readbacks on Proton. The synthetic module passed SPIR-V validation. AI-assisted (Codex and Claude Code agents). Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Native Windows check, AI-assisted (Claude Code). Windows 11, i9-13900K, 64 GB, RTX 4070 Ti 12 GB (NVIDIA 630.20), MSVC 2022 (VS 17 generator, Release), Vulkan. Head
1 passed, 0 failed. |
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Audited and verified. Configures structured buffer SRV descriptors to use OobSelect::structured_with_offset (mode 0) in
untime/shims/d3d12_vulkan_device.cpp, enforcing field offset bounds checks within record stride matching structured UAV and hardware GFX11 behavior. Verified in
untime/test/d3d12_compute_test.cpp. Approved.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Clean-Room Audit — PR #1097 (SHADER-BUFFER-BOUNDS Structured SRV Offset Check)
Solid alignment between structured buffer SRVs and UAVs (OobSelect::structured_with_offset in runtime/shims/d3d12_vulkan_device.cpp), ensuring out-of-bounds field offsets past record stride are properly checked on GFX11/RDNA2.
Clean GLSL shader test coverage in cs_user_data.comp and d3d12_compute_test.cpp; accurate docs/buffer_bounds.md documentation. 0 game data.
Verdict: APPROVED
|
AI-assisted independent GPU verification (overnight shift, worker w4). Environment: Windows, Git Bash; runtime built RelWithDebInfo (Ninja, VS2022 BuildTools, SDK 10.0.26100, Vulkan SDK 1.4.363.0, LLVM_MC=WSL llvm-21). ctest (buffer/SRV-related d3d12 subset), NVIDIA RTX 4070 SUPER (driver 610.88, 256B push constants):
ctest, AMD Radeon iGPU (RDNA2 gfx1035, driver 24.10.24, 128B push constants):
GPU suite (
Verdict: verified. Structured-buffer SRV bounds-mode-0 records produce no validation errors and no regressions; every runnable buffer/SRV test passes on both GPUs. |
|
AMD run (the gap the description lists): RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (LLPC, Vulkan 1.4.359), Windows 11, MSVC 2022 RelWithDebInfo. Head |
|
Recommendation: [MERGE] Reasoning: Structured-buffer SRVs now use bounds mode 0 so a field read at the end of a record cannot spill into the next record; test and Impact level: 5/10 |
…984 LAYOUT_UNDEFINED, Wave-21b CMake & leonida-ce 525c44e1 ReadFile fast-path - ProjectLeonida/mandy#1100 (RT-PLACED-IMAGE-DEFER): unify Resource deferred memory binding onto leonida::DeferredImageBinding (deduping duplicate flags/mutex), add LEONIDA_PLACED_IMAGE_DEFER=0 rollback, defer placed depth/UAV/RT attachments + cpu_copy bind + race-free memory_flags(), preserve MemoryPriority, add check_placed_target_backing test & docs/d3d12_vulkan.md note. - ProjectLeonida/mandy#1099 (RT-STREAM-TRANSFER-BARRIER): deduped against existing ultimate CopyBuffer/CopyResource transfer barriers; add LEONIDA_ORDER_BUFFER_COPIES=0 opt-out toggle, --expect-unordered test mode, and docs/d3d12_vulkan.md note. - ProjectLeonida/mandy#1097 (SHADER-BUFFER-BOUNDS): use OobSelect::structured_with_offset for structured buffer SRVs in d3d12_vulkan_device.cpp, add cross-record GPU readbacks in d3d12_compute_test.cpp + cs_user_data.comp (and align Xbox slot-17 CBV expectations with wave18b vector-row encoding). - ProjectLeonida/mandy#1096 (RT-STARTUP-TRACE): add VirtualQuery memory region metadata on access violations in startup_trace.h & startup_trace_test.cpp. - ProjectLeonida/mandy#1023 & #1007: update docs/directstorage.md (measured factory IID & slot 8) and docs/d3d12_vulkan.md (device slot 62 5-arg arity & slot 76 FFX-only note). - Wave-21b deferred CMake: add loader TIMEOUT 180 (Reforge#169) and tiny_game_ga / run_tiny_game_ga_tls (ubiq#947 Patch 2). - ProjectLeonida/mandy#984 (self-contained Windows-native port): accept enhanced TextureBarrier into LAYOUT_UNDEFINED without violating VUID-VkImageMemoryBarrier2-newLayout-01198 (command_list.h, vulkan_replay.h, command_list_test, replay_texture_barrier_test, d3d12_close_parity_test). - IAmNotSiob/leonida-ce 525c44e1 (GPL-3.0, deduped): wire optional xmem::commit_physical_range_fn hook into file_system.cpp ReadFile ERROR_NOACCESS retry path to commit large console buffers without per-page VEH faults while keeping zero-cost fast path and touch_pages fallback. - DesignWithTommy/Neonbridge eaf7e7e0: audited and skipped (ultimate has no refresh read-back byte/time cap skipping Bink R8/R8G8 planes).
|
Current main has the structured SRV mode-0 check in On AI-assisted. |
Claimed in the coordination issue as: SHADER-BUFFER-BOUNDS (claim).
Part of the split of #984 into small pull requests.
Depends on: none
Overlaps: #220 validates SRV descriptions, #513 changes CBV stride, and #1068 widens translator address arithmetic. This change selects the descriptor bounds mode for structured buffer SRVs.
What and why
A structured buffer SRV used the typed view's index-only bounds mode. A four-byte field starting at the end of an indexed record could therefore read the next record. Select mode 0 for structured SRVs, matching the structured UAV encoding. Raw views keep byte bounds. Typed views keep record-index bounds.
The synthetic GPU fixture reads the same field offset through a structured view and a typed view. With 16-byte records, offset 16 must read zero for the structured view. The typed control reads the next value for each valid index.
Tested
Cross-built with clang-cl 23 and the xwin SDK. Ran under CachyOS Linux 7.3, Proton Experimental (Wine 11), Ryzen 5 5600X, 16 GB RAM, RTX 4070 12 GB and NVIDIA 620.73.
The fixture skipped its native D3D12 CachedPSO comparison under Wine. Native Windows, AMD, Intel and a game boot were not tested.
GPUs tested: NVIDIA GeForce RTX 4070.
AI-assisted: yes
Checklist
🤖 Generated with Claude Code