intel/fs/gen12: Fix Render Target Read header setup for new thread payload layout.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 7 Apr 2020 23:39:59 +0000 (16:39 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Apr 2020 06:00:29 +0000 (23:00 -0700)
commite549e4f6c0c16bddec3dc4d33cc63df4529206f3
treef3fcd1340bb4d2027315d481704b412305f6f31b
parent72324035fb4dffcedd17dfc1c8d1f2ee2787e21a
intel/fs/gen12: Fix Render Target Read header setup for new thread payload layout.

In Gen12 the Poly 0 Info DWORD containing the Viewport Index and
Render Target Index fields were moved from r0.0 to r1.1 in order to
make room for dual-polygon dispatch.  The render target message format
was updated to expect that information in the same location, so we
didn't need to make any changes for framebuffer fetch to work with
SIMD8 and SIMD16 dispatch.  Unfortunately that won't work with SIMD32,
since the render target message header is assembled from r0 and r2
instead of r1, and the r2 thread payload wasn't updated with an
additional copy of the same information.  We need to fix things up
manually instead.  This avoids a handful of
EXT_shader_framebuffer_fetch regressions in combination with SIMD32
fragment shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs.cpp