summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-11-12 12:04:09 -0800
committerEric Anholt <[email protected]>2011-03-11 12:55:14 -0800
commit20f7a6f11aef492d5ca13e8ba9525eb2961d483c (patch)
tree9ab33a32d4c81db4986988207ca86fc49dbfc95f /src/mesa
parentcdacca4868bbfe2e39f72d524556e7b2c7200ba5 (diff)
mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.
For fixed function fragment processing in GLSL IR, we want to be able to reference this state value. gl_* not explicitly permitted is reserved, so using this variable name internally shouldn't be any issue.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/uniforms.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index eb289722d1a..c31c07517f0 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -209,6 +209,14 @@ static struct gl_builtin_uniform_element gl_NormalScale_elements[] = {
{NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX},
};
+static struct gl_builtin_uniform_element gl_MESABumpRotMatrix0_elements[] = {
+ {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_0}, SWIZZLE_XYZW},
+};
+
+static struct gl_builtin_uniform_element gl_MESABumpRotMatrix1_elements[] = {
+ {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_1}, SWIZZLE_XYZW},
+};
+
#define MATRIX(name, statevar, modifier) \
static struct gl_builtin_uniform_element name ## _elements[] = { \
{ NULL, { statevar, 0, 0, 0, modifier}, SWIZZLE_XYZW }, \
@@ -312,6 +320,9 @@ const struct gl_builtin_uniform_desc _mesa_builtin_uniform_desc[] = {
STATEVAR(gl_NormalMatrix),
STATEVAR(gl_NormalScale),
+ STATEVAR(gl_MESABumpRotMatrix0),
+ STATEVAR(gl_MESABumpRotMatrix1),
+
{NULL, NULL, 0}
};