i965/fs: Fix regs_written for SIMD-lowered instructions some more.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 11 Jun 2016 00:55:39 +0000 (17:55 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 13 Jun 2016 22:55:59 +0000 (15:55 -0700)
commitbd9f9726519fad94e88b9266b0c255aa00251f4d
tree2e6232fa712dbd78597fa4b15ec1e89ae80099f5
parenta84b5d43e2e54dbebe3600111f4f35c29411f831
i965/fs: Fix regs_written for SIMD-lowered instructions some more.

ISTR having suggested this during review of the recent FP64 changes to
the SIMD lowering pass, but it doesn't look like it was taken into
account in the end.  Using the fs_reg::component_size helper instead
of this open-coded variant makes sure that the stride is taken into
account correctly.  Fixes at least the following piglit tests with
spilling forced on (since otherwise regs_written would be calculated
incorrectly and the spilling code would be rather confused about how
much data needs to be spilled):

 spec.arb_gpu_shader_fp64.shader_storage.layout-std140-fp64-shader
 spec.arb_gpu_shader_fp64.shader_storage.layout-std140-fp64-mixed-shader

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp