summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_util.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-10 18:51:35 -0400
committerRob Clark <[email protected]>2014-09-12 16:23:52 -0400
commit480fe244dd41a034111963440a9f51999cfc9035 (patch)
treee3b69fd4810c9acf57c5cd5a67403f65d2e478dd /src/gallium/drivers/freedreno/freedreno_util.h
parent1fba4905690b9798c4d1e45e9679ea2f3c43ecf8 (diff)
freedreno/a3xx: format fixes
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_util.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index 8a084ecd19a..c519e23092e 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -238,4 +238,16 @@ 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 strtol(str, NULL, 0);
+ return 0;
+}
+
#endif /* FREEDRENO_UTIL_H_ */