From: Eric Anholt Date: Tue, 7 Sep 2010 23:25:22 +0000 (-0700) Subject: ir_to_mesa: Add support for gl_NormalScale. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a867be14378587574b3082071e9fff962d28d12;p=mesa.git ir_to_mesa: Add support for gl_NormalScale. Bug #30040. --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 4f6535fa479..960d5c7cece 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -703,6 +703,10 @@ static struct statevar_element gl_Fog_elements[] = { {"scale", {STATE_FOG_PARAMS}, SWIZZLE_WWWW}, }; +static struct statevar_element gl_NormalScale_elements[] = { + {NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX}, +}; + #define MATRIX(name, statevar, modifier) \ static struct statevar_element name ## _elements[] = { \ { NULL, { statevar, 0, 0, 0, modifier}, SWIZZLE_XYZW }, \ @@ -808,6 +812,7 @@ static const struct statevar { STATEVAR(gl_TextureMatrixInverseTranspose), STATEVAR(gl_NormalMatrix), + STATEVAR(gl_NormalScale), }; void diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index ead3ece95d4..2687f8ae2c0 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -1052,6 +1052,8 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) append_token(str, state[1]); append_index(str, state[2]); break; + case STATE_NORMAL_SCALE: + break; case STATE_INTERNAL: append_token(str, state[1]); if (state[1] == STATE_CURRENT_ATTRIB)