Mesa (master): mesa: remove unused functions in program.c

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 14 18:48:23 UTC 2015


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct 13 20:12:56 2015 -0600

mesa: remove unused functions in program.c

replace_registers() and adjust_param_indexes() were unused.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/program/program.c |   51 --------------------------------------------
 1 file changed, 51 deletions(-)

diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index c35a89b..86de5e9 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -450,57 +450,6 @@ _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count)
 
 
 /**
- * Search instructions for registers that match (oldFile, oldIndex),
- * replacing them with (newFile, newIndex).
- */
-static void
-replace_registers(struct prog_instruction *inst, GLuint numInst,
-                  GLuint oldFile, GLuint oldIndex,
-                  GLuint newFile, GLuint newIndex)
-{
-   GLuint i, j;
-   for (i = 0; i < numInst; i++) {
-      /* src regs */
-      for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
-         if (inst[i].SrcReg[j].File == oldFile &&
-             inst[i].SrcReg[j].Index == oldIndex) {
-            inst[i].SrcReg[j].File = newFile;
-            inst[i].SrcReg[j].Index = newIndex;
-         }
-      }
-      /* dst reg */
-      if (inst[i].DstReg.File == oldFile && inst[i].DstReg.Index == oldIndex) {
-         inst[i].DstReg.File = newFile;
-         inst[i].DstReg.Index = newIndex;
-      }
-   }
-}
-
-
-/**
- * Search instructions for references to program parameters.  When found,
- * increment the parameter index by 'offset'.
- * Used when combining programs.
- */
-static void
-adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
-                     GLuint offset)
-{
-   GLuint i, j;
-   for (i = 0; i < numInst; i++) {
-      for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
-         GLuint f = inst[i].SrcReg[j].File;
-         if (f == PROGRAM_CONSTANT ||
-             f == PROGRAM_UNIFORM ||
-             f == PROGRAM_STATE_VAR) {
-            inst[i].SrcReg[j].Index += offset;
-         }
-      }
-   }
-}
-
-
-/**
  * Populate the 'used' array with flags indicating which registers (TEMPs,
  * INPUTs, OUTPUTs, etc, are used by the given program.
  * \param file  type of register to scan for




More information about the mesa-commit mailing list