Skip to content

intel/fs: Fix gl_FrontFacing optimization on Gfx12+

Ian Romanick requested to merge idr/mesa:review/issue-5876 into main

It's not obvious why the (gl_FrontFacing ? -1.0 : 1.0) case was handled different for Gfx12+ than for previous generations, and it's not correct. It tries to negate the result as an integer, and it does this before the mask operation that clears the other bits in the value.

When we eventually support dual-SIMD8 dispatch, the other front-facing bit is in g1.6 at bit 15, so similar code should be possible there.

Fixes: c92fb600 ("intel/fs/gen12: Implement gl_FrontFacing on gen12+.")
Closes: #5876 (closed)

Merge request reports