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

Current atomics scheme fail when users forget to update the shader binding table #69

Open
natevm opened this issue Jan 31, 2023 · 2 comments

Comments

@natevm
Copy link
Contributor

natevm commented Jan 31, 2023

I'd like to be able to use HLSL's InterlockedXYZ calls to do things like atomically compute bounding boxes, rasterize into grids, etc.

At the moment, GPRT uses Vulkan's raw device addressing capabilities to load and store data to and from memory. But these raw addresses aren't compatible with HLSL's interlocked calls, since those calls currently require a "Resource variable type" like a RWStructuredBuffer.

@natevm natevm changed the title How to use atomics? Current atomics scheme fail when users forget to update the shader binding table Nov 3, 2023
@natevm
Copy link
Contributor Author

natevm commented Nov 3, 2023

Hitting an issue where if I launch a kernel using push constants and forget to update the shader binding table beforehand, gprt atomics silently fail. The reason for this is because we're computing buffer addresses and updating the corresponding descriptor set as part of the SBT build. When buffer handles are uploaded into the push constants structure, they return addresses that aren't available yet in the underlying variable length buffer descriptor set.

@natevm
Copy link
Contributor Author

natevm commented Nov 3, 2023

Another issue is that when an atomic operation is performed on a RWByteAddressBuffer, threads using the raw buffer load and store commands do not receive updates, since "globallycoherent" storage classes don't seem to be supported...

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

No branches or pull requests

1 participant