Fix switching between const and non-const attributes #545
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.
This PR fixes switching between constant and non-constant attributes. See: #474. At the end of the day, the simple problem was that constant attributes set some properties on the
BINDING
viabut do not actively unset
buffer
. As a result, the the next call to a buffer attribute does not notice that buffer attributes were previously disabled and now must be enabled. The solution was to simply setBINDING.buffer=null
when using constant attributes.The other half of the debugging was working around a strange instanced arrays interaction detailed in #544.
Sorry it took so long to get to to the bottom of this, but thanks @dy for providing such a debuggable test case!