mesa: pre-swizzle normal scale state value
This commit is contained in:
@@ -775,8 +775,7 @@ static struct ureg get_transformed_normal( struct tnl_program *p )
|
|||||||
struct ureg rescale = register_param2(p, STATE_INTERNAL,
|
struct ureg rescale = register_param2(p, STATE_INTERNAL,
|
||||||
STATE_NORMAL_SCALE);
|
STATE_NORMAL_SCALE);
|
||||||
|
|
||||||
emit_op2( p, OPCODE_MUL, transformed_normal, 0, normal,
|
emit_op2( p, OPCODE_MUL, transformed_normal, 0, normal, rescale );
|
||||||
swizzle1(rescale, X));
|
|
||||||
normal = transformed_normal;
|
normal = transformed_normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -397,7 +397,11 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
|||||||
case STATE_INTERNAL:
|
case STATE_INTERNAL:
|
||||||
switch (state[1]) {
|
switch (state[1]) {
|
||||||
case STATE_NORMAL_SCALE:
|
case STATE_NORMAL_SCALE:
|
||||||
ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1);
|
ASSIGN_4V(value,
|
||||||
|
ctx->_ModelViewInvScale,
|
||||||
|
ctx->_ModelViewInvScale,
|
||||||
|
ctx->_ModelViewInvScale,
|
||||||
|
1);
|
||||||
return;
|
return;
|
||||||
case STATE_TEXRECT_SCALE:
|
case STATE_TEXRECT_SCALE:
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user