summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_util.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-23 17:24:27 -0400
committerRob Clark <[email protected]>2014-09-24 18:52:58 -0400
commita87e44da3a801028783979cfd3548d0ebc9fdd88 (patch)
treeb7272890c5f2be5567d602c3a6ba27b993cf78a8 /src/gallium/drivers/freedreno/freedreno_util.h
parent9f47220450d3083b7625db1818232cf5c68ae7cd (diff)
freedreno/a3xx: initial texture border-color
Still some open questions.. and at any rate, no additional piglit passes due to various wrap modes that we need to emulate in at least some cases :-( But it does fix some mystery page-faults.. So add some comments in the code where there are things that we need to emulate or do more r/e, and push as-is. 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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index d676f80d71b..a762c8f0575 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -38,6 +38,7 @@
#include "util/u_math.h"
#include "util/u_half.h"
#include "util/u_dynarray.h"
+#include "util/u_pack_color.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
@@ -250,4 +251,12 @@ static inline uint32_t env2u(const char *envvar)
return 0;
}
+static inline uint32_t
+pack_rgba(enum pipe_format format, const float *rgba)
+{
+ union util_color uc;
+ util_pack_color(rgba, format, &uc);
+ return uc.ui[0];
+}
+
#endif /* FREEDRENO_UTIL_H_ */