[Mesa-dev] [PATCH 0/4] i965/fs: Optimize (or disable) unlit centroid W/A.

Matt Turner mattst88 at gmail.com
Sun Jun 29 23:18:13 PDT 2014


This series optimizes the code emitted for the unlit centroid workaround.

Previously we emitted 

      mov(1) f0, g1.14  // move channel enables to flag
      pln(8) dst, ...   // centroid interpolation
(-f0) pln(8) dst, ...   // non-centroid interpolation for unlit pixels

Patch 2 predicates the centroid interpolation pln instruction -- maybe
letting the shader do less work. Patch 3 reverses the order of the pln
instructions and sets the dependency control hints, since they write
to non-overlapping components of the destination and since some channel
must be enabled for our shader to be executing.

Patch 4 disables the workaround on Haswell, since the BSpec seems to
state that it's only needed on Ivy Bridge.

Unfortunately, the tests mentioned by Paul in commit 8313f444 pass with
the workaround disabled on Ivy Bridge. The reasoning that the dependency
control hints are safe has been confirmed to be valid by reversing the
order of the pln instructions (so that the one predicated with -f0 is
last) and observing GPU hangs.



More information about the mesa-dev mailing list