render/gles2: replace wlr_gles2_texture.wl_format with drm_format

This commit is contained in:
Simon Ser 2021-02-16 19:17:18 +01:00
parent fab396f149
commit 549435aee5
4 changed files with 13 additions and 12 deletions

View file

@ -45,10 +45,9 @@ static const struct wlr_gles2_pixel_format formats[] = {
// TODO: more pixel formats
const struct wlr_gles2_pixel_format *get_gles2_format_from_wl(
enum wl_shm_format fmt) {
const struct wlr_gles2_pixel_format *get_gles2_format_from_drm(uint32_t fmt) {
for (size_t i = 0; i < sizeof(formats) / sizeof(*formats); ++i) {
if (convert_drm_format_to_wl_shm(formats[i].drm_format) == fmt) {
if (formats[i].drm_format == fmt) {
return &formats[i];
}
}