Mesa (master): mesa: make _mesa_find_temp_intervals() a static function

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 26 14:11:17 UTC 2021


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Mon Apr 26 16:35:05 2021 +1000

mesa: make _mesa_find_temp_intervals() a static function

It is no longer used externally.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>

---

 src/mesa/program/prog_optimize.c | 15 +++++++--------
 src/mesa/program/prog_optimize.h |  6 ------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c
index 7efdcadc122..d6530ccd001 100644
--- a/src/mesa/program/prog_optimize.c
+++ b/src/mesa/program/prog_optimize.c
@@ -954,11 +954,11 @@ update_interval(GLint intBegin[], GLint intEnd[],
 /**
  * Find first/last instruction that references each temporary register.
  */
-GLboolean
-_mesa_find_temp_intervals(const struct prog_instruction *instructions,
-                          GLuint numInstructions,
-                          GLint intBegin[REG_ALLOCATE_MAX_PROGRAM_TEMPS],
-                          GLint intEnd[REG_ALLOCATE_MAX_PROGRAM_TEMPS])
+static bool
+find_temp_intervals(const struct prog_instruction *instructions,
+                    GLuint numInstructions,
+                    GLint intBegin[REG_ALLOCATE_MAX_PROGRAM_TEMPS],
+                    GLint intEnd[REG_ALLOCATE_MAX_PROGRAM_TEMPS])
 {
    struct loop_info loopStack[MAX_LOOP_NESTING];
    GLuint loopStackDepth = 0;
@@ -1034,9 +1034,8 @@ find_live_intervals(struct gl_program *prog,
    }
 
    /* build intermediate arrays */
-   if (!_mesa_find_temp_intervals(prog->arb.Instructions,
-                                  prog->arb.NumInstructions,
-                                  intBegin, intEnd))
+   if (!find_temp_intervals(prog->arb.Instructions, prog->arb.NumInstructions,
+                            intBegin, intEnd))
       return GL_FALSE;
 
    /* Build live intervals list from intermediate arrays */
diff --git a/src/mesa/program/prog_optimize.h b/src/mesa/program/prog_optimize.h
index fadfd621c55..0012d633322 100644
--- a/src/mesa/program/prog_optimize.h
+++ b/src/mesa/program/prog_optimize.h
@@ -39,12 +39,6 @@ struct gl_program;
 struct prog_instruction;
 
 
-extern GLboolean
-_mesa_find_temp_intervals(const struct prog_instruction *instructions,
-                          GLuint numInstructions,
-                          GLint intBegin[MAX_PROGRAM_TEMPS],
-                          GLint intEnd[MAX_PROGRAM_TEMPS]);
-
 extern void
 _mesa_optimize_program(struct gl_program *program, void *mem_ctx);
 



More information about the mesa-commit mailing list