summaryrefslogtreecommitdiff
path: root/src/mesa/program
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-12-10 09:29:00 -0700
committerBrian Paul <brianp@vmware.com>2010-12-10 09:29:00 -0700
commit6a0d3b7696260f449a1d0c5222814568764e8110 (patch)
treea87feed522adb10c381a54fb3c3af9c8d8cf56d8 /src/mesa/program
parentdcb48e7eb41efb2d2ae12da0f59710334cf36796 (diff)
mesa: implement system values in program interpreter
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_execute.c4
-rw-r--r--src/mesa/program/prog_execute.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index 1d97a077f5..c20347fe67 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -159,6 +159,10 @@ get_src_register_pointer(const struct prog_src_register *source,
return ZeroVec;
return prog->Parameters->ParameterValues[reg];
+ case PROGRAM_SYSTEM_VALUE:
+ assert(reg < Elements(machine->SystemValues));
+ return machine->SystemValues[reg];
+
default:
_mesa_problem(NULL,
"Invalid src register file %d in get_src_register_pointer()",
diff --git a/src/mesa/program/prog_execute.h b/src/mesa/program/prog_execute.h
index cefd468c36..cdf37082a0 100644
--- a/src/mesa/program/prog_execute.h
+++ b/src/mesa/program/prog_execute.h
@@ -61,6 +61,7 @@ struct gl_program_machine
GLfloat (*EnvParams)[4]; /**< Vertex or Fragment env parameters */
GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */
GLint AddressReg[MAX_PROGRAM_ADDRESS_REGS][4];
+ GLfloat SystemValues[SYSTEM_VALUE_MAX][4];
const GLubyte *Samplers; /** Array mapping sampler var to tex unit */