Signed-off-by: Rob Clark <robdcl...@gmail.com>
---
 src/gallium/drivers/freedreno/freedreno_util.h | 12 ------------
 src/gallium/drivers/freedreno/ir3/ir3_nir.c    |  4 ++--
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_util.h 
b/src/gallium/drivers/freedreno/freedreno_util.h
index 0017ac5a397..e03f37dd627 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -411,18 +411,6 @@ emit_marker(struct fd_ringbuffer *ring, int scratch_idx)
        OUT_RING(ring, ++marker_cnt);
 }
 
-/* helper to get numeric value from environment variable..  mostly
- * just leaving this here because it is helpful to brute-force figure
- * out unknown formats, etc, which blob driver does not support:
- */
-static inline uint32_t env2u(const char *envvar)
-{
-       char *str = getenv(envvar);
-       if (str)
-               return strtoul(str, NULL, 0);
-       return 0;
-}
-
 static inline uint32_t
 pack_rgba(enum pipe_format format, const float *rgba)
 {
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c 
b/src/gallium/drivers/freedreno/ir3/ir3_nir.c
index e470c07bf17..db9e3b17c43 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c
@@ -25,7 +25,7 @@
  */
 
 
-#include "freedreno_util.h"
+#include "util/debug.h"
 
 #include "ir3_nir.h"
 #include "ir3_compiler.h"
@@ -101,7 +101,7 @@ ir3_optimize_loop(nir_shader *s)
                progress |= OPT(s, nir_opt_cse);
                static int gcm = -1;
                if (gcm == -1)
-                       gcm = env2u("GCM");
+                       gcm = env_var_as_unsigned("GCM", 0);
                if (gcm == 1)
                        progress |= OPT(s, nir_opt_gcm, true);
                else if (gcm == 2)
-- 
2.19.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to