Skip to content

Feedback on page SDL3/SDL_BindGPUComputeStorageBuffers #766

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

Open
NickWaanders opened this issue Apr 2, 2025 · 1 comment
Open

Feedback on page SDL3/SDL_BindGPUComputeStorageBuffers #766

NickWaanders opened this issue Apr 2, 2025 · 1 comment

Comments

@NickWaanders
Copy link

While it technically says it, it was very confusing to me that the first_slot parameter isn't a global slot index (like the t-register in hlsl), but instead is a local buffer slot index.

So in this example:

Texture2D texture0 : register(t0, space0);
Texture2D texture1 : register(t1, space0);
StructuredBuffer buffer0 : register(t2, space0);

to bind buffer0, you'd need to call SDL_BindGPUComputeStorageBuffers with first_slot set to 0. I expected to need to set it using first_slot 2.

I wish the documentation had a few more hints or examples to this effect, as it took me quite a while to figure out.

@slouken
Copy link
Contributor

slouken commented Apr 2, 2025

@thatcosmonaut, you said you were working on an article to clarify these sorts of things?

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

2 participants