program: Remove RelAddr2 support.
authorMatt Turner <mattst88@gmail.com>
Sat, 27 Feb 2016 21:44:50 +0000 (13:44 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Mar 2016 19:41:29 +0000 (11:41 -0800)
Looks like more never-used crap from the first geometry shader attempt.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
src/mesa/program/ir_to_mesa.cpp
src/mesa/program/prog_instruction.h
src/mesa/program/prog_optimize.c
src/mesa/program/prog_print.c
src/mesa/state_tracker/st_mesa_to_tgsi.c

index 6d33b1b071a5bedd25325ee600efc247f7dbebaa..6051df1546d8277b5b75204f2f1b6de5110603c6 100644 (file)
@@ -2187,9 +2187,6 @@ mesa_src_reg_from_ir_src_reg(src_reg reg)
    mesa_reg.RelAddr = reg.reladdr != NULL;
    mesa_reg.Negate = reg.negate;
    mesa_reg.Abs = 0;
-   mesa_reg.HasIndex2 = GL_FALSE;
-   mesa_reg.RelAddr2 = 0;
-   mesa_reg.Index2 = 0;
 
    return mesa_reg;
 }
index d56f96cfaa1d7828538398719e3cabd91ff7b379..d839268d2d1489bf2de9e79278e6e151e589e6dc 100644 (file)
@@ -235,22 +235,6 @@ struct prog_src_register
     * instruction which allows per-component negation.
     */
    GLuint Negate:4;
-
-   /**
-    * Is the register two-dimensional.
-    * Two dimensional registers are of the
-    * REGISTER[index][index2] format.
-    * They are used by the geometry shaders where
-    * the first index is the index within an array
-    * and the second index is the semantic of the
-    * array, e.g. gl_PositionIn[index] would become
-    * INPUT[index][gl_PositionIn]
-    */
-   GLuint HasIndex2:1;
-   GLuint RelAddr2:1;
-   GLint Index2:(INST_INDEX_BITS+1); /**< Extra bit here for sign bit.
-                                       * May be negative for relative
-                                       * addressing. */
 };
 
 
index f9e9035fc3e4a788ea5a1649fab9d2c46e858809..9f7d0e30f18ec7ef20f3c03155d52298b84b3fbd 100644 (file)
@@ -465,8 +465,6 @@ can_downward_mov_be_modifed(const struct prog_instruction *mov)
       mov->SrcReg[0].RelAddr == 0 &&
       mov->SrcReg[0].Negate == 0 &&
       mov->SrcReg[0].Abs == 0 &&
-      mov->SrcReg[0].HasIndex2 == 0 &&
-      mov->SrcReg[0].RelAddr2 == 0 &&
       mov->DstReg.RelAddr == 0 &&
       mov->DstReg.CondMask == COND_TR;
 }
index bb7c2c6e527d5b3180e94b08f6276c97ff16d0b2..2bc07cb82c6cc4148cefb5184812af845b0ec923 100644 (file)
@@ -354,8 +354,7 @@ arb_output_attrib_string(GLuint index, GLenum progType)
  */
 static const char *
 reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
-           GLboolean relAddr, const struct gl_program *prog,
-           GLboolean hasIndex2, GLboolean relAddr2, GLint index2)
+           GLboolean relAddr, const struct gl_program *prog)
 {
    static char str[100];
    const char *addr = relAddr ? "ADDR+" : "";
@@ -366,11 +365,6 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
    case PROG_PRINT_DEBUG:
       sprintf(str, "%s[%s%d]",
               _mesa_register_file_name(f), addr, index);
-      if (hasIndex2) {
-         int offset = strlen(str);
-         const char *addr2 = relAddr2 ? "ADDR+" : "";
-         sprintf(str+offset, "[%s%d]", addr2, index2);
-      }
       break;
 
    case PROG_PRINT_ARB:
@@ -534,8 +528,7 @@ fprint_dst_reg(FILE * f,
 {
    fprintf(f, "%s%s",
           reg_string((gl_register_file) dstReg->File,
-                     dstReg->Index, mode, dstReg->RelAddr, prog,
-                      GL_FALSE, GL_FALSE, 0),
+                     dstReg->Index, mode, dstReg->RelAddr, prog),
           _mesa_writemask_string(dstReg->WriteMask));
    
    if (dstReg->CondMask != COND_TR) {
@@ -565,8 +558,7 @@ fprint_src_reg(FILE *f,
    fprintf(f, "%s%s%s%s",
           abs,
           reg_string((gl_register_file) srcReg->File,
-                     srcReg->Index, mode, srcReg->RelAddr, prog,
-                      srcReg->HasIndex2, srcReg->RelAddr2, srcReg->Index2),
+                     srcReg->Index, mode, srcReg->RelAddr, prog),
           _mesa_swizzle_string(srcReg->Swizzle,
                                srcReg->Negate, GL_FALSE),
           abs);
index be47823a04850cc536ac563ee17f275da88399f2..62f0aee7a62ab94f65ed6622f59da6c5e0594f0d 100644 (file)
@@ -311,15 +311,6 @@ translate_src( struct st_translate *t,
 {
    struct ureg_src src = src_register( t, SrcReg->File, SrcReg->Index );
 
-   if (t->procType == TGSI_PROCESSOR_GEOMETRY && SrcReg->HasIndex2) {
-      src = src_register( t, SrcReg->File, SrcReg->Index2 );
-      if (SrcReg->RelAddr2)
-         src = ureg_src_dimension_indirect( src, ureg_src(t->address[0]),
-                                            SrcReg->Index);
-      else
-         src = ureg_src_dimension( src, SrcReg->Index);
-   }
-
    src = ureg_swizzle( src,
                        GET_SWZ( SrcReg->Swizzle, 0 ) & 0x3,
                        GET_SWZ( SrcReg->Swizzle, 1 ) & 0x3,