summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-09-06 14:09:37 -0700
committerEric Anholt <[email protected]>2019-11-07 19:43:41 +0000
commitd27dda907aca8d7b92b7330c498958e01eb962ae (patch)
tree50ad3fd44eac9aaa455a6ee5043ed2b7df76c606 /src/mesa/drivers
parent6b1c250245e4e29ea42e853ee094a8d6e9d1b665 (diff)
mesa: Prepare for the MESA_FORMAT_* enum to be sparse.
To redefine MESA_FORMAT in terms of PIPE_FORMAT enums, we need to fix places where we iterated up to MESA_FORMAT_COUNT. I use _mesa_get_format_name(f) == NULL as the signal that it's not an enum value with a MESA_FORMAT. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_surface_formats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index b42bbf870b6..570122e2d1d 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -217,6 +217,8 @@ intel_screen_init_surface_formats(struct intel_screen *screen)
gen += 5;
for (format = MESA_FORMAT_NONE + 1; format < MESA_FORMAT_COUNT; format++) {
+ if (!_mesa_get_format_name(format))
+ continue;
enum isl_format texture, render;
bool is_integer = _mesa_is_format_integer_color(format);