-
Notifications
You must be signed in to change notification settings - Fork 960
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
GLES 3.0 Binding Model Broken with Shared Vertex/Fragment Uniform Buffers #3349
Comments
Hi again @cwfitzgerald! Can you help me figure out if I'm running into this issue? The repro steps are |
Yeah - binding a single buffer with VERTEX_FRAGMENT doesn't work. It will only end up binding to one stage. |
So I'm extra sure, you're saying that this is no good...
But I could, for example, split the above layout entry into two layout entries that bind to the same buffer that I bound to before. Does that sound right? |
Correct! |
This bug doesn't exist. I do not have the original reproduction for this issue and the test I wrote for it passes every time. Notably we use glUniformBlockBinding to bind the blocks on the CPU side, which allows us to call bind once to multiple blocks, and everything is happy. The reproduction still found a bug in #4607, so I'm going to keep it in the PR. |
That matches what I'm seeing too. Splitting my layouts into separate FRAGMENT | VERTEX usages didn't seem to change anything for me. |
Description
Due to GLES 3.0 not having binding indexes, we need to rely completely on reflection to bind all the buffers in the right place. Naga (correctly) generates unique names and structures and such for the vertex and fragment shaders. Because there are no binding indexes, GLES matches up bindings by name of the struct, and because they are different, creates different bindings for each stage.
Our choices are to:
In order to not add this giant requirement, we should change our binding model.
Repro steps
Bind a buffer to both vertex and fragment shaders in GLES 3.0.
Expected vs observed behavior
Only one of the buffers will be correctly bound, the other won't be. This will cause all sorts of nonsense.
The text was updated successfully, but these errors were encountered: