Mesa (master): mesa: remove some unfinished/devel code

Brian Paul brianp at kemper.freedesktop.org
Mon May 4 17:28:24 UTC 2009


Module: Mesa
Branch: master
Commit: 27dbdb1684af42ce3e7962111fa0726cf7ba28d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=27dbdb1684af42ce3e7962111fa0726cf7ba28d1

Author: Brian Paul <brianp at vmware.com>
Date:   Mon May  4 11:13:35 2009 -0600

mesa: remove some unfinished/devel code

---

 src/mesa/shader/prog_optimize.c |   92 ---------------------------------------
 1 files changed, 0 insertions(+), 92 deletions(-)

diff --git a/src/mesa/shader/prog_optimize.c b/src/mesa/shader/prog_optimize.c
index a02f5ef..be90310 100644
--- a/src/mesa/shader/prog_optimize.c
+++ b/src/mesa/shader/prog_optimize.c
@@ -812,98 +812,6 @@ _mesa_reallocate_registers(struct gl_program *prog)
 }
 
 
-
-
-
-
-
-
-#if 0
-static void
-_mesa_find_temporary_live_intervals(struct gl_program *prog,
-                                    GLint firstInst[MAX_PROGRAM_TEMPS],
-                                    GLint lastInst[MAX_PROGRAM_TEMPS])
-{
-   GLuint i;
-
-   for (i = 0; i < MAX_PROGRAM_TEMPS; i++) {
-      firstInst[i] = lastInst[i] = -1;
-   }
-
-   struct loop_info loopStack[MAX_LOOP_NESTING];
-   GLuint loopStackDepth = 0;
-   GLint intBegin[MAX_PROGRAM_TEMPS], intEnd[MAX_PROGRAM_TEMPS];
-   GLuint i;
-
-   /*
-    * Note: we'll return GL_FALSE below if we find relative indexing
-    * into the TEMP register file.  We can't handle that yet.
-    * We also give up on subroutines for now.
-    */
-
-   if (dbg) {
-      _mesa_printf("Optimize: Begin find intervals\n");
-   }
-
-   for (i = 0; i < MAX_PROGRAM_TEMPS; i++){
-      intBegin[i] = intEnd[i] = -1;
-   }
-
-   /* Scan instructions looking for temporary registers */
-   for (i = 0; i < prog->NumInstructions; i++) {
-      const struct prog_instruction *inst = prog->Instructions + i;
-      if (inst->Opcode == OPCODE_BGNLOOP) {
-         loopStack[loopStackDepth].Start = i;
-         loopStack[loopStackDepth].End = inst->BranchTarget;
-         loopStackDepth++;
-      }
-      else if (inst->Opcode == OPCODE_ENDLOOP) {
-         loopStackDepth--;
-      }
-      else if (inst->Opcode == OPCODE_CAL) {
-         return GL_FALSE;
-      }
-      else {
-         const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode);
-         GLuint j;
-         for (j = 0; j < numSrc; j++) {
-            if (inst->SrcReg[j].File == PROGRAM_TEMPORARY) {
-               const GLuint index = inst->SrcReg[j].Index;
-               if (inst->SrcReg[j].RelAddr)
-                  return GL_FALSE;
-               update_interval(intBegin, intEnd, index, i);
-               if (loopStackDepth > 0) {
-                  /* extend temp register's interval to end of loop */
-                  GLuint loopEnd = loopStack[loopStackDepth - 1].End;
-                  update_interval(intBegin, intEnd, index, loopEnd);
-               }
-            }
-         }
-         if (inst->DstReg.File == PROGRAM_TEMPORARY) {
-            const GLuint index = inst->DstReg.Index;
-            if (inst->DstReg.RelAddr)
-               return GL_FALSE;
-            update_interval(intBegin, intEnd, index, i);
-            if (loopStackDepth > 0) {
-               /* extend temp register's interval to end of loop */
-               GLuint loopEnd = loopStack[loopStackDepth - 1].End;
-               update_interval(intBegin, intEnd, index, loopEnd);
-            }
-         }
-      }
-   }
-
-
-
-
-#endif
-
-
-
-
-
-
-
 /**
  * Apply optimizations to the given program to eliminate unnecessary
  * instructions, temp regs, etc.




More information about the mesa-commit mailing list