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

StorageBuffer::Num shold match SG_MAX_SHADERSTAGE_STORAGE_BUFFERS #129

Merged
merged 1 commit into from
May 17, 2024

Conversation

jdah
Copy link
Contributor

@jdah jdah commented May 17, 2024

This bit me today while doing some experiments with the new storage buffer support :D

StorageBuffer::Num == 4 while SG_MAX_SHADERSTAGE_STORAGE_BUFFERS == 8, causing the sg_shader_desc to not mark storage buffers 4..8 as used (and sokol_gfx.h to give a validation error) even when they compile just fine and are enumerated by the *_storagebuffer_slot reflection function. oops!

@floooh
Copy link
Owner

floooh commented May 17, 2024

Oops good catch, sorry that was an oversight on my side. At first I had restricted the number of storage buffers to 4 per stage in sokol_gfx.h, but then bumped that number to 8 (since that's the 'minspec' in WebGPU and also in OpenGL the total number of storage buffers seems to be 16 across all shader stages).

I'll merge the PR and then kick off a CI pipeline which will update the binaries in sokol-tools-bin.

@floooh floooh merged commit e0be4a7 into floooh:master May 17, 2024
3 checks passed
@floooh
Copy link
Owner

floooh commented May 17, 2024

...link to CI pipeline: https://github.com/floooh/sokol-tools/actions/runs/9130637428

When this goes green the binaries in sokol-tools-bin will be uptodate.

Thanks for the PR!

floooh added a commit that referenced this pull request May 17, 2024
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