mesa: Remove remnants of PROGRAM_VARYING.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 14 Oct 2012 23:56:42 +0000 (16:56 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 16 Oct 2012 18:35:24 +0000 (11:35 -0700)
The previous patch removed the producer of things in this file.
Since there aren't any, we can remove it.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/mtypes.h
src/mesa/program/prog_parameter_layout.c
src/mesa/program/prog_print.c
src/mesa/program/programopt.c
src/mesa/state_tracker/st_program.c

index 8bff789ac80f8ec870a3895cab1520829ca6387a..c3378cd99ed1273ea5073300fc2253301b4700c0 100644 (file)
@@ -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[] */
index e4f2db3b379498820962122d18e3c0a286990a69..e83469059c598a97e71add4bdddbac243889d9d2 100644 (file)
@@ -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_OUTPUT)
             || (inst->SrcReg[i].Base.File >= PROGRAM_WRITE_ONLY)) {
            continue;
         }
index bb506ea87c05763d90f3860f43745dbd6813e9f7..5fadb82f659b684f105540e5db1df8e56ab97f65 100644 (file)
@@ -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;
index 389ea218b488b87a98a49ddabad607cdca0970dd..2a37021988a0b55cdfe08fadbaf1b5794c93995a 100644 (file)
@@ -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;
index ac066a766c9a175b227e9aa7446b28524ae8bc99..a9111b523a417f12d0ee92f5ff9464ba8a69f527 100644 (file)
@@ -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) {