This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] Rework attribute binding (again) #9433
Merged
Merged
Commits on Jul 12, 2017
-
Configuration menu - View commit details
-
Copy full SHA for fbbc8f2 - Browse repository at this point
Copy the full SHA fbbc8f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fb212d - Browse repository at this point
Copy the full SHA 8fb212dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fedfaa2 - Browse repository at this point
Copy the full SHA fedfaa2View commit details -
[core] Rework attribute binding (again)
These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program. Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute. In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations. VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
Configuration menu - View commit details
-
Copy full SHA for c61041b - Browse repository at this point
Copy the full SHA c61041bView commit details -
[core] Per-segment-per-layer vertex arrays
Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
Configuration menu - View commit details
-
Copy full SHA for 358b030 - Browse repository at this point
Copy the full SHA 358b030View commit details -
Configuration menu - View commit details
-
Copy full SHA for 01aff01 - Browse repository at this point
Copy the full SHA 01aff01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49726cd - Browse repository at this point
Copy the full SHA 49726cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c42132 - Browse repository at this point
Copy the full SHA 4c42132View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2691fe1 - Browse repository at this point
Copy the full SHA 2691fe1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86ee821 - Browse repository at this point
Copy the full SHA 86ee821View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0d6a07 - Browse repository at this point
Copy the full SHA c0d6a07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1176ead - Browse repository at this point
Copy the full SHA 1176eadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 11952db - Browse repository at this point
Copy the full SHA 11952dbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.