Open LumpBloom7 opened 2 weeks ago
depends on the uniform data being set before binding, where the check occurs. Failure to do so will result in incorrect uniform data being used during drawing
I'm not sure I can get past the hidden breakage aspect of this, even if there are no usages...
I agree, which is the reason I brought it up. If this quick fix is used, we likely should enforce the order of uniform uploads. (Cannot set data while bound?)
The previous reference-equality guaranteed that DrawNodes that bind uniform blocks will break batches, even if the uniform block data is identical to an adjacent DrawNode for the same shader.
Value equality allows adjacent DrawNodes with the same uniform data to share the same uniform block, and therefore the same batch.
A possible problem with this solution is that it depends on the uniform data being set before binding, where the check occurs. Failure to do so will result in incorrect uniform data being used during drawing. However, all code in osu/framework binds after setting uniform data, so I don't feel like it is a problem in general.
Uniform uploads still happen even with this change.