i965: Shrink stage_prog_data param array length
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 29 May 2016 00:57:31 +0000 (17:57 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Sun, 29 May 2016 16:59:55 +0000 (09:59 -0700)
commit7398a32c501ed7fedb5619ee7505f9070551d4bd
tree2639d5cfd78f6e5aa7c955ba48bba4768704e79c
parent160063b110d50d528217492308bbe353af2186e8
i965: Shrink stage_prog_data param array length

It appears we were over-allocating these arrays.

Previously we would use nir->num_uniforms directly for scalar
programs, and multiply it by 4 for vec4 programs.

Instead we should have been dividing by 4 in both cases to convert
from bytes to a gl_constant_value count. The size of gl_constant_value
is 4 bytes.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_cs.c
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c