summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-11-22 14:14:05 -0800
committerEmil Velikov <[email protected]>2014-11-26 21:23:14 +0000
commitdca88397cabca8ddf3b2199dab858683aba536e0 (patch)
treeacb63055515d4e06ad53533885f81434ed937320 /Android.mk
parent6c383aaaddd0def1b0366dc2995af56f14f9d1c0 (diff)
glsl: Make lower_constant_arrays_to_uniforms require dereferences.
Ilia noticed that my lowering pass was converting the constant array used by textureGatherOffsets' offsets parameter to a uniform. This broke textureGather for Nouveau, and is generally a horrible plan, since it violates the GLSL constraint that offsets must be an immediate constant. When I wrote this pass, I neglected to consider whole array assignment. I figured opt_array_splitting would handle constant indexing, so this pass was really about fixing variable indexing. textureGatherOffsets is an example of whole array access that we really don't want to touch. Whole array copies don't appear to benefit from this either - they're most likely initializers for temporary arrays which are going to be mutated anyway. Since you're copying, you may as well copy from immediates, not uniforms. This patch makes the pass look for ir_dereference_arrays of ir_constants, rather than looking for any ir_constant directly. This way, it ignores whole array assignment. No shader-db changes or Piglit regressions on Haswell. Some Piglit tests generate different code (fixing textureGatherOffsets on Nouveau). Signed-off-by: Kenneth Graunke <[email protected]> Tested-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.4" <[email protected]> (cherry picked from commit 60f011af1a370004333cbc3fee7fec137ebd9d6a)
Diffstat (limited to 'Android.mk')
0 files changed, 0 insertions, 0 deletions