i965: Add lowering pass for splitting textureGatherOffsets
authorChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Oct 2013 09:15:14 +0000 (22:15 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sat, 26 Oct 2013 09:28:26 +0000 (22:28 +1300)
commita936000db6c0ead5a4b469673fd93534efe66e0d
treee01bdce9c83cbb970ff48302435e704f67ccaed1
parent4c1eae53951353643d0e172bc3a47b847312c7dc
i965: Add lowering pass for splitting textureGatherOffsets

Rewrites textureGatherOffsets(s, p, offsets) into

   gvec4(
      textureGatherOffset(s, p, offsets[0]).w,
      textureGatherOffset(s, p, offsets[1]).w,
      textureGatherOffset(s, p, offsets[2]).w,
      textureGatherOffset(s, p, offsets[3]).w
      )

V2: Use ir_builder to be slightly clearer.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_lower_offset_array.cpp [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_shader.cpp