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

Array uniforms should respect SG_UNIFORMLAYOUT_NATIVE #611

Merged
merged 1 commit into from
Jan 15, 2022

Conversation

nmr8acme
Copy link
Contributor

I had a little trouble recently upgrading from sokol_gfx @ bfc41f3 to aaf2c33, as the UB layouts introduced no longer match the expected size and layout for a native GLES2 shader when a float array is used (or any other sub-16-byte primitive array.) IIUC there is just an unhandled case, so I tried to handle it.

@floooh
Copy link
Owner

floooh commented Jan 14, 2022

Ooops, yeah, looks like I missed that. I'll try to come up with a GL sample which doesn't use sokol-shdc to test this case.

Will look into this over the weekend.

@floooh
Copy link
Owner

floooh commented Jan 15, 2022

Ok merged, many thanks!

I've written a new GLFW sample/test (not committed yet) which tests float, vec2 and vec3 uniform arrays (not pushed yet). Before your PR this would already fail in the sokol-gfx validation layer (wrong uniform block size).

Screenshot 2022-01-15 at 15 17 32

@floooh
Copy link
Owner

floooh commented Jan 15, 2022

PS: I merged the PR with the "command line" procedure, not by pressing the PR Merge button.

Github seems to be a bit confused (maybe because your git handle "nathan" is different from the Github account "nmr8acme") and doesn't list you in the Contributors tab: https://github.com/floooh/sokol/graphs/contributors

Your commit is properly showing up in the history though (but note how your name isn't clickable):

https://github.com/floooh/sokol/commits/master

Just in case you're wondering what's up with that ;)

@floooh
Copy link
Owner

floooh commented Jan 15, 2022

@floooh
Copy link
Owner

floooh commented Jan 15, 2022

And Changelog update (15-Jan-2022): https://github.com/floooh/sokol/blob/master/CHANGELOG.md

@nmr8acme
Copy link
Contributor Author

Thanks :)

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