Page MenuHome

Fix T78803: Bad widget drawing with the R600g driver
ClosedPublic

Authored by Omar Emara (OmarSquircleArt) on Apr 13 2021, 2:53 PM.

Details

Summary

The SB back-end optimizer for the mesa R600g driver corrupts the vertex
shader for widget drawing. This will not be fixed upstream because SB is
getting replaced as part of the new NIR path. This was thought to be an
issue with instancing and an attempted fix was submitted in D8374, but
it did not fix the issue.

This patch reimplements the array look-up part of the code using switch case as
a workaround and removes the old workaround implemented as part of D8374.

Diff Detail

Repository
rB Blender

Event Timeline

Omar Emara (OmarSquircleArt) requested review of this revision.Apr 13 2021, 2:53 PM
Omar Emara (OmarSquircleArt) created this revision.

To be fair, maybe rewritting this with if/else's or a switch is better for readability and compiler issues. Can you give it a try?

@Clément Foucault (fclem) Switch case seems to work. Should I update the patch with switch case?

Omar Emara (OmarSquircleArt) edited the summary of this revision. (Show Details)
  • Use switch case instead.

Missing default case but this can be fixed before commiting.

This revision is now accepted and ready to land.Apr 13 2021, 6:57 PM

@Clément Foucault (fclem) Do we need a default case here? What should it do?

I mean for the sake of completeness and to avoid undefined behavior if anything goes wrong. Put the default case on top of case 0: