glamor: fix XVideo run with GLES

For now, it sets .version=120, which prevents shader from compiling on ES.
We just force version of shaders to be always 100 on ES, because we use
only 120 shaders on ES anyway, and all shaders works.

Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com>

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
(cherry picked from commit dcba460af3)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1636>
This commit is contained in:
Konstantin 2022-06-28 12:28:39 +03:00
parent fc70125153
commit e52e256f1c

View file

@ -283,6 +283,11 @@ glamor_build_program(ScreenPtr screen,
gpu_shader4 = TRUE;
}
}
/* For now, fix shader version to GLES as 100. We will fall with 130 shaders
* in previous check due to forcibly set 120 glsl for GLES. But this patch
* makes xv shaders to work */
if(version && glamor_priv->is_gles)
version = 100;
vs_vars = vs_location_vars(locations);
fs_vars = fs_location_vars(locations);