i965/fp: Fix segfault on gen4 TXB instructions.
authorEric Anholt <eric@anholt.net>
Mon, 26 Nov 2012 21:39:11 +0000 (13:39 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 30 Nov 2012 06:34:28 +0000 (22:34 -0800)
commit2f7915bdb9e1f12861cddbb97f8101693565a59e
tree10933aa1c3e104cb0b23dada5aeb937245d46137
parentf126f34c1d1726336586da7f5a726546963a0f0a
i965/fp: Fix segfault on gen4 TXB instructions.

The gen4 simd16 workaround looks at ir->type to determine how much
storage to allocate for the simd16 value.  In fragment programs,
texturing only ever returns float vec4s (unlike GLSL, which can also
have scalar floats or vector integers), so this is the right type.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56962
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_fp.cpp