i965/vs: Make pre-gen6 math operate in vector mode instead of scalar.

On the old backend, we used scalar mode because Mesa IR math is
result.xyzw = math(op0.xxxx), which matched up well.  However, in GLSL
IR we do things like result.xy = math(op0.xy), so we want vector mode.
For the common case of result.x = math(op0.x), performance will be the
same (no cost for un-executed channels), though result.xyzw =
math(op0.xxxx) would be worse.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2011-08-30 15:59:26 -07:00
parent 87be0ac96c
commit 9f84288607

View file

@ -259,7 +259,7 @@ vec4_visitor::generate_math1_gen4(vec4_instruction *inst,
BRW_MATH_SATURATE_NONE,
inst->base_mrf,
src,
BRW_MATH_DATA_SCALAR,
BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
}