freedreno/ir3: fix fixing-up register footprint
authorRob Clark <robdclark@gmail.com>
Wed, 28 Feb 2018 22:33:29 +0000 (17:33 -0500)
committerRob Clark <robdclark@gmail.com>
Mon, 5 Mar 2018 13:05:33 +0000 (08:05 -0500)
commit175d1b437263e5eab0e47378fbeca3dd71002cd0
tree654c6e903192374e9621f4d04f0ac00eccc5837b
parent9a62536108514434c22ec189ecf273eb09fc7d77
freedreno/ir3: fix fixing-up register footprint

It isn't just vertex shaders that need to fixup reg footprint for inputs
populated before shader starts.

This problem showed up with compute shaders.  If you have (for example)
a localregid sysval, but only the .x component is used, the hw still
writes the .yz components, which could overflow into other threads
causing corruption.  Showed up in cl cts 'basic/test_basic intmath_int'.
But in theory the same problem could crop up elsewhere.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_shader.c