summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 5b8bec901b0..877f7933b9a 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1452,6 +1452,8 @@ dri2_wl_swrast_get_stride_for_format(int format, int w)
{
int visual_idx = dri2_wl_visual_idx_from_shm_format(format);
+ assume(visual_idx != -1);
+
return w * (dri2_wl_visuals[visual_idx].bpp / 8);
}