mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 04:38:09 +02:00
Currently we have a weird design. We have a hardcoded array (named dri2_wl_visuals) with all the formats that we support, which are 9. And we also have EGL_DRI2_MAX_FORMATS, which is a constant set to 10. In patches in which people added new formats to dri2_wl_visuals, this constant had its value increased. This is confusing, as its name gives the idea that we can't support more formats. This constant is only used to define the bitset size of dri2_egl_display::formats. And it should work just fine if we created this bitset with the number of formats supported. To make things clearer, replace EGL_DRI2_MAX_FORMATS by EGL_DRI2_NUM_FORMATS, which must be equal to ARRAY_SIZE(dri2_wl_visuals) (i.e. the number of supported formats). In the next commits we get rid of this constant completely, as it is prone to errors. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11248> |
||
|---|---|---|
| .. | ||
| drivers | ||
| generate | ||
| main | ||
| wayland | ||
| egl-entrypoint-check.py | ||
| egl-glvnd-symbols.txt | ||
| egl-symbols.txt | ||
| meson.build | ||