aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx/fd2_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx/fd2_util.h')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_util.h b/src/gallium/drivers/freedreno/a2xx/fd2_util.h
index cf945b14475..b87ef412c4a 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_util.h
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_util.h
@@ -32,7 +32,8 @@
#include "a2xx.xml.h"
struct surface_format {
-#define FMT_INVALID 0x7f
+/* If enum is a signed type, 0x7f is out of range. Cast it to avoid warnings. */
+#define FMT_INVALID ((enum a2xx_sq_surfaceformat) 0x7f)
enum a2xx_sq_surfaceformat format : 7;
enum sq_tex_sign sign : 2;
enum sq_tex_num_format num_format : 1;