diff options
author | Kristian H. Kristensen <[email protected]> | 2020-05-22 13:36:38 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-26 18:35:03 +0000 |
commit | e369b8931c675a6e86715c682723b085e45e0ee5 (patch) | |
tree | 9115f45c5f1623a14cf904de02e6e96332a554d6 /src/gallium/drivers/freedreno/a2xx | |
parent | 5ec3747fbe8e1d5a5a8b29b123b843b57ce77c6e (diff) |
freedreno: Use explicit *_NONE enum for undefined formats
This adds RB, VFMT and TFMT NONE values for a3xx-a5xx and FMT6_NONE
for a6xx. Use those values instead of open coded (enum xxx) ~0 or
sometimes even ~0, which triggers out-of-enum range warnings.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5173>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_util.h | 3 |
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; |