mesa/src
Kenneth Graunke dadc50add5 intel: Fix SIMD16 unaligned payload GRF reads on Gen4-5.
When the SIMD16 Gen4-5 fragment shader payload contains source depth
(g2-3), destination stencil (g4), and destination depth (g5-6), the
single register of stencil makes the destination depth unaligned.

We were generating this instruction in the RT write payload setup:

   mov(16)   m14<1>F   g5<8,8,1>F   { align1 compr };

which is illegal, instructions with a source region spanning more than
one register need to be aligned to even registers.  This is because the
hardware implicitly does (nr | 1) instead of (nr + 1) when splitting the
compressed instruction into two mov(8)'s.

I believe this would cause the hardware to load g5 twice, replicating
subspan 0-1's destination depth to subspan 2-3.  This showed up as 2x2
artifact blocks in both TIS-100 and Reicast.

Normally, we rely on the register allocator to even-align our virtual
GRFs.  But we don't control the payload, so we need to lower SIMD widths
to make it work.  To fix this, we teach lower_simd_width about the
restriction, and then call it again after lower_load_payload (which is
what generates the offending MOV).

Fixes: 8aee87fe4c (i965: Use SIMD16 instead of SIMD8 on Gen4 when possible.)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107212
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=13728
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Diego Viola <diego.viola@gmail.com>
(cherry picked from commit 08a5c395ab)
2018-08-10 15:30:10 +03:00
..
amd android: radv: build vulkan.radv conditionally to radeonsi 2018-08-06 15:44:06 +03:00
broadcom v3d: Emit the VCM_CACHE_SIZE packet. 2018-08-07 20:55:09 +03:00
compiler glsl: handle error case with ast_post_inc, ast_post_dec 2018-08-10 15:26:21 +03:00
egl wayland/egl: update surface size on window resize 2018-08-09 03:47:42 +03:00
gallium vc4: Fix vc4_fence_server_sync() on pre-syncobj kernels. 2018-08-09 03:48:49 +03:00
gbm gbm: Add support for 10bpp BGR formats 2018-08-01 12:55:37 +01:00
getopt
glx glx: GLX_MESA_multithread_makecurrent is direct-only 2018-08-10 15:29:09 +03:00
gtest autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
hgl meson: Add Haiku platform support v4 2018-02-16 16:56:34 -06:00
intel intel: Fix SIMD16 unaligned payload GRF reads on Gen4-5. 2018-08-10 15:30:10 +03:00
loader loader_dri3: Handle mismatched depth 30 formats for Prime renderoffload. 2018-08-01 12:55:37 +01:00
mapi mesa: GL_MESA_framebuffer_flip_y extension [v4] 2018-07-27 12:32:25 -07:00
mesa autotools: use correct gl.pc LIBS when using glvnd 2018-08-09 03:46:50 +03:00
util drirc: Allow extension midshader for Metro Redux 2018-08-10 15:24:45 +03:00
vulkan vulkan/wsi: fix incorrect assignment in assert() 2018-07-25 20:55:35 +01:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am egl: rewire the build systems to use libwayland-egl 2018-06-06 12:11:57 -07:00
meson.build v3d: Fix meson build without vc4. 2018-07-29 19:22:33 -07:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00