[Mesa-dev] [PATCH 20/23] mesa: Remove remnants of PROGRAM_VARYING.

Kenneth Graunke kenneth at whitecape.org
Sun Oct 14 17:43:20 PDT 2012


The previous patch removed the producer of things in this file.
Since there aren't any, we can remove it.
---
 src/mesa/main/mtypes.h                   | 1 -
 src/mesa/program/prog_parameter_layout.c | 2 +-
 src/mesa/program/prog_print.c            | 5 -----
 src/mesa/program/programopt.c            | 7 ++-----
 src/mesa/state_tracker/st_program.c      | 2 --
 5 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b22d183..5d3c627 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1851,7 +1851,6 @@ typedef enum
    PROGRAM_TEMPORARY,   /**< machine->Temporary[] */
    PROGRAM_INPUT,       /**< machine->Inputs[] */
    PROGRAM_OUTPUT,      /**< machine->Outputs[] */
-   PROGRAM_VARYING,     /**< machine->Inputs[]/Outputs[] */
    PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
    PROGRAM_ENV_PARAM,   /**< gl_program->Parameters[] */
    PROGRAM_STATE_VAR,   /**< gl_program->Parameters[] */
diff --git a/src/mesa/program/prog_parameter_layout.c b/src/mesa/program/prog_parameter_layout.c
index e4f2db3..ea919ab 100644
--- a/src/mesa/program/prog_parameter_layout.c
+++ b/src/mesa/program/prog_parameter_layout.c
@@ -173,7 +173,7 @@ _mesa_layout_parameters(struct asm_parser_state *state)
 	    continue;
 	 }
 
-	 if ((inst->SrcReg[i].Base.File <= PROGRAM_VARYING )
+	 if ((inst->SrcReg[i].Base.File <= PROGRAM_LOCAL_PARAM)
 	     || (inst->SrcReg[i].Base.File >= PROGRAM_WRITE_ONLY)) {
 	    continue;
 	 }
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index bb506ea..5fadb82 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -64,8 +64,6 @@ _mesa_register_file_name(gl_register_file f)
       return "CONST";
    case PROGRAM_UNIFORM:
       return "UNIFORM";
-   case PROGRAM_VARYING:
-      return "VARYING";
    case PROGRAM_WRITE_ONLY:
       return "WRITE_ONLY";
    case PROGRAM_ADDRESS:
@@ -348,9 +346,6 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
       case PROGRAM_LOCAL_PARAM:
          sprintf(str, "program.local[%s%d]", addr, index);
          break;
-      case PROGRAM_VARYING: /* extension */
-         sprintf(str, "varying[%s%d]", addr, index);
-         break;
       case PROGRAM_CONSTANT: /* extension */
          sprintf(str, "constant[%s%d]", addr, index);
          break;
diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
index 389ea21..2a37021 100644
--- a/src/mesa/program/programopt.c
+++ b/src/mesa/program/programopt.c
@@ -499,9 +499,7 @@ _mesa_count_texture_instructions(struct gl_program *prog)
 
 /**
  * Scan/rewrite program to remove reads of custom (output) registers.
- * The passed type has to be either PROGRAM_OUTPUT or PROGRAM_VARYING
- * (for vertex shaders).
- * In GLSL shaders, varying vars can be read and written.
+ * The passed type has to be PROGRAM_OUTPUT.
  * On some hardware, trying to read an output register causes trouble.
  * So, rewrite the program to use a temporary register in this case.
  */
@@ -517,8 +515,7 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type)
    _mesa_find_used_registers(prog, PROGRAM_TEMPORARY,
                              usedTemps, MAX_PROGRAM_TEMPS);
 
-   assert(type == PROGRAM_VARYING || type == PROGRAM_OUTPUT);
-   assert(prog->Target == GL_VERTEX_PROGRAM_ARB || type != PROGRAM_VARYING);
+   assert(type == PROGRAM_OUTPUT);
 
    for (i = 0; i < VERT_RESULT_MAX; i++)
       outputMap[i] = -1;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index ac066a7..a9111b5 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -309,7 +309,6 @@ st_translate_vertex_program(struct st_context *st,
    if (!stvp->glsl_to_tgsi)
    {
       _mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_OUTPUT);
-      _mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_VARYING);
    }
 
    ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
@@ -828,7 +827,6 @@ st_translate_geometry_program(struct st_context *st,
       return NULL;
 
    _mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_OUTPUT);
-   _mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_VARYING);
 
    ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY );
    if (ureg == NULL) {
-- 
1.7.12.2



More information about the mesa-dev mailing list