i965/vec4: Don't set header_present if texel offsets are all 0.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 18 Jan 2014 22:34:07 +0000 (14:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 23 Jan 2014 01:18:49 +0000 (17:18 -0800)
commite0a560291184b7b5ff32afa60a202893ca5a3d77
treedcbfb87d6d870d1a4cf31dc020b852b6b292053e
parent6943ac0bd9d0d07019cffbbcb5189aa8d67b729b
i965/vec4: Don't set header_present if texel offsets are all 0.

In theory, a shader might use textureOffset() but set all the texel
offsets to zero.  In that case, we don't actually need to set up the
message header - zero is the implicit default.

By moving the texture_offset setup before the header_present setup, we
can easily only set header_present when there are non-zero texel offset
values.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp