Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ByteAddressBuffer.Load<T>(uint64_t) to allow loading beyond 2 or 4GiB buffers #307

Open
Nielsbishere opened this issue Aug 26, 2024 · 1 comment

Comments

@Nielsbishere
Copy link

A problem with the current spec is that BAB loads in DXIL are marked as a i32. This means that it's ultimately up to the driver to decide to do either the "safe" or the "logical" thing. If the user inputs -1 then the driver has to make the decision if they mean 0xFFFFFFFF or -1. Some vendors in the wild choose to safeguard and discard negative values, while others (such as WARP) reinterpret it as u32 instead.
Load2 has a similar issue, but this one is marked in the spec as uint even though according to Jesse, it behaves the same under the hood (so it's an i32/ambiguous too).
The proper solution imo is to add a 64-bit BAB.Load which will allow not just 4GiB buffers, but also beyond that (up to 40 bit).

@StarsX
Copy link

StarsX commented Oct 25, 2024

Agree. uint64_t index also helps to achieve an equivalent feature to Vulkan buffer reference. We just need to set 0 VA to a root UAV slot.

@damyanp damyanp added this to the Shader Model Backlog milestone Oct 28, 2024
@damyanp damyanp moved this to Triaged in HLSL Triage Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triaged
Development

No branches or pull requests

3 participants