Skip to content

[upstream #1737] Direct DXIL: enforce byte-buffer bounds across memory windows - #391

Draft
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1737
Draft

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1737

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Improve direct DXIL buffer bounds checking and reduce the cost of narrow buffer loads.

Part of xcl-dev#1269.

What is in it

  • Added offset and access-width overflow checks for buffer loads, stores and atomics.
  • Optimized byte and halfword loads.
  • Added GPU regression tests for root-bound and heap-bound buffers.
  • Updated the shader cache version.

Tested

  • GPU: NVIDIA RTX 5070 Ti Laptop GPU
  • Driver: 621.14
  • CPU: Intel Core Ultra 9 275HX
  • OS: Windows 11
  • Rust: 1.100.0
  • Build: Release

Both targeted regression cases failed before the patch and passed after it. All 251,904 synthetic output checks matched the CPU reference.

Benchmark Before After
Compilation time 1.44 ms 0.95 ms
Compiler memory 0.47 MiB 0.26 MiB
DXIL size 9,292 bytes 4,740 bytes
GPU dispatch 1.28 µs 1.23 µs

Test command: cargo test --release --workspace --no-fail-fast -- --nocapture --test-threads=1

  • HLSL: 858 passed, 0 failed, 42 ignored.
  • Direct DXIL: 857 passed, 1 existing upstream cache-test failure, 42 ignored.
  • Five explicit GPU test skips in each mode.

Regression run

Main: Pending.

PR: Pending.

Known limitations

The OOB_SELECT and SOFFSET concerns raised during review remain under investigation. This patch does not yet implement complete descriptor-correct bounds checking.

Not tested

  • Retail game regression runs.
  • AMD hardware.
  • Full test suite on the rebased branch.

AI use

OpenAI Codex (GPT-6.2-Astra and GPT-6.2-Sol) assisted with implementation, regression testing, benchmarking, upstream compatibility checks and PR preparation.


Mirror of xcl-dev#1737 (auto-synced, do not edit).

Reject offset and access-width overflow in multi-window buffer operations. Reduce narrow loads and cover root and heap bindings in GPU regressions.

AI assistance: OpenAI Codex helped implement, test, and benchmark the change. Codex (GPT-6.2-sol) prepared the branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants