mesa: pre-swizzle normal scale state value
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index e36f1f6..7a099b2 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -775,8 +775,7 @@
struct ureg rescale = register_param2(p, STATE_INTERNAL,
STATE_NORMAL_SCALE);
- emit_op2( p, OPCODE_MUL, transformed_normal, 0, normal,
- swizzle1(rescale, X));
+ emit_op2( p, OPCODE_MUL, transformed_normal, 0, normal, rescale );
normal = transformed_normal;
}
diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c
index 37bd17b..44fbfdc 100644
--- a/src/mesa/shader/prog_statevars.c
+++ b/src/mesa/shader/prog_statevars.c
@@ -397,7 +397,11 @@
case STATE_INTERNAL:
switch (state[1]) {
case STATE_NORMAL_SCALE:
- ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1);
+ ASSIGN_4V(value,
+ ctx->_ModelViewInvScale,
+ ctx->_ModelViewInvScale,
+ ctx->_ModelViewInvScale,
+ 1);
return;
case STATE_TEXRECT_SCALE:
{