From a87e44da3a801028783979cfd3548d0ebc9fdd88 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 23 Sep 2014 17:24:27 -0400 Subject: 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 --- src/gallium/drivers/freedreno/freedreno_util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/drivers/freedreno/freedreno_util.h') 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_ */ -- cgit v1.2.3