summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-11-24 10:49:25 +0000
committerEric Engestrom <[email protected]>2017-11-28 09:50:36 +0000
commitbca122902a8511c32b5fb0b8ebbdf7bce002a82b (patch)
tree8e56eb3a4b7e93e4f9022ba2a3669a556497012f /src/gallium/state_trackers
parentdd078689041077eb9d90888a3cb0166fdc093b93 (diff)
st/dri: replace hard-coded array size with ARRAY_SIZE()
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 91f50fe8e32..31b2c37bfd0 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -219,7 +219,7 @@ dri_fill_in_modes(struct dri_screen *screen)
if (dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING))
num_formats = ARRAY_SIZE(mesa_formats);
else
- num_formats = 5;
+ num_formats = ARRAY_SIZE(mesa_formats) - 2;
/* Add configs. */
for (format = 0; format < num_formats; format++) {