ir_to_mesa: Add support for gl_NormalScale.
authorEric Anholt <eric@anholt.net>
Tue, 7 Sep 2010 23:25:22 +0000 (16:25 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 7 Sep 2010 23:43:35 +0000 (16:43 -0700)
Bug #30040.

src/mesa/program/ir_to_mesa.cpp
src/mesa/program/prog_statevars.c

index 4f6535fa47953fa501eb9a8084fe1da2834ff04e..960d5c7cece3d7c4959fd0aaaed5557455b8195f 100644 (file)
@@ -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
index ead3ece95d48e5214e2b4355396b467674b0bcd8..2687f8ae2c0c9eae5e53626efd84a5befc918db2 100644 (file)
@@ -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)