mesa: Remove PROGRAM_LOCAL_PARAM enum.
authorEric Anholt <eric@anholt.net>
Wed, 13 Nov 2013 21:38:37 +0000 (13:38 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 15 Nov 2013 19:34:57 +0000 (11:34 -0800)
This has been replaced with referring to local parameters using
PROGRAM_STATE_VAR and _mesa_load_state_parameters.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/i915_fragprog.c
src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/main/mtypes.h
src/mesa/program/prog_execute.c
src/mesa/program/prog_print.c
src/mesa/program/program.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_mesa_to_tgsi.c

index 67eff7665d1eaf6d0e89d2491e36678b625680f2..fcdca75d6769606d7b1cb9a5a0119ce0fbd8a227 100644 (file)
@@ -160,9 +160,6 @@ src_vector(struct i915_fragment_program *p,
       /* Various paramters and env values.  All emitted to
        * hardware as program constants.
        */
-   case PROGRAM_LOCAL_PARAM:
-      src = i915_emit_param4fv(p, program->Base.LocalParams[source->Index]);
-      break;
 
    case PROGRAM_ENV_PARAM:
       src =
index 461b7cb55a84d805d7c7dab4230d52327acb0be9..5f15a575b5cc62ec8b5f3fae6466cefaae6dce80 100644 (file)
@@ -210,7 +210,6 @@ static unsigned long t_src_class(gl_register_file file)
    case PROGRAM_INPUT:
       return VSF_IN_CLASS_ATTR;
 
-   case PROGRAM_LOCAL_PARAM:
    case PROGRAM_ENV_PARAM:
    case PROGRAM_CONSTANT:
    case PROGRAM_STATE_VAR:
index 41ffdb765d5b0022f366024a2767fb9be5f69560..82c915fd007234912e5bbb66f0167cf759fcd618 100644 (file)
@@ -1941,7 +1941,6 @@ typedef enum
    PROGRAM_ARRAY,       /**< Arrays & Matrixes */
    PROGRAM_INPUT,       /**< machine->Inputs[] */
    PROGRAM_OUTPUT,      /**< machine->Outputs[] */
-   PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
    PROGRAM_ENV_PARAM,   /**< gl_program->Parameters[] */
    PROGRAM_STATE_VAR,   /**< gl_program->Parameters[] */
    PROGRAM_CONSTANT,    /**< gl_program->Parameters[] */
index 560332a6e63e27008b1ac08921b0f5a746206a77..4a6414747b47fecea57b3e1da5c3fe3c6b91325f 100644 (file)
@@ -118,11 +118,6 @@ get_src_register_pointer(const struct prog_src_register *source,
          return ZeroVec;
       return machine->Outputs[reg];
 
-   case PROGRAM_LOCAL_PARAM:
-      if (reg >= MAX_PROGRAM_LOCAL_PARAMS)
-         return ZeroVec;
-      return machine->CurProgram->LocalParams[reg];
-
    case PROGRAM_ENV_PARAM:
       if (reg >= MAX_PROGRAM_ENV_PARAMS)
          return ZeroVec;
index fa9063f5b9d3730fbe9c3b3df82daa8b91c1d4a8..e503cb62bb6edc33c7cf1f1663cf44b49d1e9dfc 100644 (file)
@@ -50,8 +50,6 @@ _mesa_register_file_name(gl_register_file f)
    switch (f) {
    case PROGRAM_TEMPORARY:
       return "TEMP";
-   case PROGRAM_LOCAL_PARAM:
-      return "LOCAL";
    case PROGRAM_ENV_PARAM:
       return "ENV";
    case PROGRAM_STATE_VAR:
@@ -385,9 +383,6 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
       case PROGRAM_ENV_PARAM:
          sprintf(str, "program.env[%s%d]", addr, index);
          break;
-      case PROGRAM_LOCAL_PARAM:
-         sprintf(str, "program.local[%s%d]", addr, index);
-         break;
       case PROGRAM_CONSTANT: /* extension */
          sprintf(str, "constant[%s%d]", addr, index);
          break;
index a102ec17ab46f7fabcde966abceed9709a2a872a..e8bb7d7ff5f4c5190a4c4931c41b03ef5ee76d05 100644 (file)
@@ -912,9 +912,6 @@ _mesa_valid_register_index(const struct gl_context *ctx,
    case PROGRAM_ENV_PARAM:
       return index >= 0 && index < (GLint) c->MaxEnvParams;
 
-   case PROGRAM_LOCAL_PARAM:
-      return index >= 0 && index < (GLint) c->MaxLocalParams;
-
    case PROGRAM_UNIFORM:
    case PROGRAM_STATE_VAR:
       /* aka constant buffer */
index 0eaf7467b06076c23ce18c9f180f36cb4259ffd1..78baf8926bf66179d2b7064c25c1439f642c4825 100644 (file)
@@ -70,8 +70,7 @@ extern "C" {
 }
 
 #define PROGRAM_IMMEDIATE PROGRAM_FILE_MAX
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_LOCAL_PARAM) |  \
-                           (1 << PROGRAM_ENV_PARAM) |    \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) |    \
                            (1 << PROGRAM_STATE_VAR) |    \
                            (1 << PROGRAM_CONSTANT) |     \
                            (1 << PROGRAM_UNIFORM))
@@ -565,7 +564,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_LOCAL_PARAM:
       case PROGRAM_ENV_PARAM:
       case PROGRAM_STATE_VAR:
       case PROGRAM_CONSTANT:
@@ -583,7 +581,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_LOCAL_PARAM:
             case PROGRAM_ENV_PARAM:
             case PROGRAM_STATE_VAR:
             case PROGRAM_CONSTANT:
@@ -4312,7 +4309,6 @@ src_register(struct st_translate *t,
       return ureg_src(dst_register(t, file, index));
 
    case PROGRAM_ENV_PARAM:
-   case PROGRAM_LOCAL_PARAM:
    case PROGRAM_UNIFORM:
       assert(index >= 0);
       return t->constants[index];
@@ -4963,7 +4959,6 @@ st_translate_program(
       for (i = 0; i < proginfo->Parameters->NumParameters; i++) {
          switch (proginfo->Parameters->Parameters[i].Type) {
          case PROGRAM_ENV_PARAM:
-         case PROGRAM_LOCAL_PARAM:
          case PROGRAM_STATE_VAR:
          case PROGRAM_UNIFORM:
             t->constants[i] = ureg_DECL_constant(ureg, i);
index 1bbeced346c06e9732f65cbe69cb92facba0a822..13b026764b56fd77c53a5053f7d2caf3f48c2152 100644 (file)
@@ -46,8 +46,7 @@
 #include "util/u_memory.h"
 
 
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_LOCAL_PARAM) |  \
-                           (1 << PROGRAM_ENV_PARAM) |    \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) |    \
                            (1 << PROGRAM_STATE_VAR) |    \
                            (1 << PROGRAM_CONSTANT) |     \
                            (1 << PROGRAM_UNIFORM))
@@ -215,7 +214,6 @@ src_register( struct st_translate *t,
       return ureg_src(t->temps[index]);
 
    case PROGRAM_ENV_PARAM:
-   case PROGRAM_LOCAL_PARAM:
    case PROGRAM_UNIFORM:
       assert(index >= 0);
       return t->constants[index];
@@ -1196,7 +1194,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_LOCAL_PARAM:
          case PROGRAM_STATE_VAR:
          case PROGRAM_UNIFORM:
             t->constants[i] = ureg_DECL_constant( ureg, i );