mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
egl/wayland: check for invalid format index
v2: just tell the compiler to assume the format will always be found, as
it comes from the table itself to begin with. (DanielS)
CID: 1429516
Fixes: d32b23f383 "egl/wayland: Add bpp to visual map"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
a176b053b6
commit
65dda6c9ec
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue