summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-11-13 13:41:28 -0800
committerEric Anholt <[email protected]>2013-11-15 11:34:59 -0800
commitbb1f0969756fbb827c4b2520c632daa15342b064 (patch)
tree11655aa90b64a15c47f561681b5c72ab690c9dfc
parent33b0455211019988fe418cca5dfac62c7902c861 (diff)
mesa: Remove PROGRAM_ENV_PARAM enum.
This has been replaced with referring to env parameters using PROGRAM_STATE_VAR and _mesa_load_state_parameters. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c8
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c1
-rw-r--r--src/mesa/main/mtypes.h8
-rw-r--r--src/mesa/program/prog_execute.c5
-rw-r--r--src/mesa/program/prog_print.c5
-rw-r--r--src/mesa/program/program.c3
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp7
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c5
8 files changed, 5 insertions, 37 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index fcdca75d676..dff4b9f0b12 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -160,14 +160,6 @@ src_vector(struct i915_fragment_program *p,
/* Various paramters and env values. All emitted to
* hardware as program constants.
*/
-
- case PROGRAM_ENV_PARAM:
- src =
- i915_emit_param4fv(p,
- p->ctx->FragmentProgram.Parameters[source->
- Index]);
- break;
-
case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 5f15a575b5c..23974738a83 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -210,7 +210,6 @@ static unsigned long t_src_class(gl_register_file file)
case PROGRAM_INPUT:
return VSF_IN_CLASS_ATTR;
- case PROGRAM_ENV_PARAM:
case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
return VSF_IN_CLASS_PARAM;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 82c915fd007..0f470da3713 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1930,10 +1930,9 @@ struct gl_perf_monitor_state
* NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
* All values should fit in a 4-bit field.
*
- * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR,
- * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to
- * be "uniform" variables since they can only be set outside glBegin/End.
- * They're also all stored in the same Parameters array.
+ * NOTE: PROGRAM_STATE_VAR, PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be
+ * considered to be "uniform" variables since they can only be set outside
+ * glBegin/End. They're also all stored in the same Parameters array.
*/
typedef enum
{
@@ -1941,7 +1940,6 @@ typedef enum
PROGRAM_ARRAY, /**< Arrays & Matrixes */
PROGRAM_INPUT, /**< machine->Inputs[] */
PROGRAM_OUTPUT, /**< machine->Outputs[] */
- PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */
PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */
PROGRAM_CONSTANT, /**< gl_program->Parameters[] */
PROGRAM_UNIFORM, /**< gl_program->Parameters[] */
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index 4a6414747b4..115525eba57 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -118,11 +118,6 @@ get_src_register_pointer(const struct prog_src_register *source,
return ZeroVec;
return machine->Outputs[reg];
- case PROGRAM_ENV_PARAM:
- if (reg >= MAX_PROGRAM_ENV_PARAMS)
- return ZeroVec;
- return machine->EnvParams[reg];
-
case PROGRAM_STATE_VAR:
/* Fallthrough */
case PROGRAM_CONSTANT:
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index e503cb62bb6..fa120cc5e3a 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -50,8 +50,6 @@ _mesa_register_file_name(gl_register_file f)
switch (f) {
case PROGRAM_TEMPORARY:
return "TEMP";
- case PROGRAM_ENV_PARAM:
- return "ENV";
case PROGRAM_STATE_VAR:
return "STATE";
case PROGRAM_INPUT:
@@ -380,9 +378,6 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
case PROGRAM_TEMPORARY:
sprintf(str, "temp%d", index);
break;
- case PROGRAM_ENV_PARAM:
- sprintf(str, "program.env[%s%d]", addr, index);
- break;
case PROGRAM_CONSTANT: /* extension */
sprintf(str, "constant[%s%d]", addr, index);
break;
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index e8bb7d7ff5f..b7b5140adc5 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -909,9 +909,6 @@ _mesa_valid_register_index(const struct gl_context *ctx,
case PROGRAM_TEMPORARY:
return index >= 0 && index < (GLint) c->MaxTemps;
- case PROGRAM_ENV_PARAM:
- return index >= 0 && index < (GLint) c->MaxEnvParams;
-
case PROGRAM_UNIFORM:
case PROGRAM_STATE_VAR:
/* aka constant buffer */
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 78baf8926bf..6319079d524 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -70,8 +70,7 @@ extern "C" {
}
#define PROGRAM_IMMEDIATE PROGRAM_FILE_MAX
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) | \
- (1 << PROGRAM_STATE_VAR) | \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
@@ -564,7 +563,6 @@ glsl_to_tgsi_visitor::emit(ir_instruction *ir, unsigned op,
/* Update indirect addressing status used by TGSI */
if (dst.reladdr) {
switch(dst.file) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
@@ -581,7 +579,6 @@ glsl_to_tgsi_visitor::emit(ir_instruction *ir, unsigned op,
for (i=0; i<3; i++) {
if(inst->src[i].reladdr) {
switch(inst->src[i].file) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
@@ -4308,7 +4305,6 @@ src_register(struct st_translate *t,
case PROGRAM_ARRAY:
return ureg_src(dst_register(t, file, index));
- case PROGRAM_ENV_PARAM:
case PROGRAM_UNIFORM:
assert(index >= 0);
return t->constants[index];
@@ -4958,7 +4954,6 @@ st_translate_program(
for (i = 0; i < proginfo->Parameters->NumParameters; i++) {
switch (proginfo->Parameters->Parameters[i].Type) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant(ureg, i);
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 13b026764b5..921b0f9b894 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -46,8 +46,7 @@
#include "util/u_memory.h"
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) | \
- (1 << PROGRAM_STATE_VAR) | \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
@@ -213,7 +212,6 @@ src_register( struct st_translate *t,
t->temps[index] = ureg_DECL_temporary( t->ureg );
return ureg_src(t->temps[index]);
- case PROGRAM_ENV_PARAM:
case PROGRAM_UNIFORM:
assert(index >= 0);
return t->constants[index];
@@ -1193,7 +1191,6 @@ st_translate_mesa_program(
for (i = 0; i < program->Parameters->NumParameters; i++) {
switch (program->Parameters->Parameters[i].Type) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant( ureg, i );