OSDN Git Service

i965: Add lowering pass to fold offset into unnormalized coords
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 12 Oct 2013 10:14:15 +0000 (23:14 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sat, 26 Oct 2013 09:56:09 +0000 (22:56 +1300)
commit72b5e9c42a6cfe085f7683057672ab2278e45c2e
tree8c6286f699b2a4c6150c60a0f6be045f5e07862d
parenta936000db6c0ead5a4b469673fd93534efe66e0d
i965: Add lowering pass to fold offset into unnormalized coords

It turns out that nonzero offsets with gsampler2DRect don't work -- they
just return garbage. Work around this by folding the offset into the
coord.

Done as an IR pass rather than yet another hack in the visitors because
it's clear what's going on this way. Can possibly reuse this to replace
the existing txf coord+offset hacks.

V2: Use ir_builder

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_unnormalized_offset.cpp [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_shader.cpp