gl-renderer: support XYUV8888 wl_shm format
This support is added so that the XYUV shader variant can be tested with wl_shm from the test suite. Libwayland version requirement is bumped to get WL_SHM_FORMAT_XYUV8888. Libwayland is bumped to 1.18 too in the CI image. libwayland-dev package is dropped, because we build wayland anyway. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
4b301fe7f2
commit
30104bd89a
|
@ -20,7 +20,7 @@ stages:
|
|||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: buster
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh'
|
||||
FDO_DISTRIBUTION_TAG: '2021-02-25.0'
|
||||
FDO_DISTRIBUTION_TAG: '2021-02-25.1'
|
||||
|
||||
|
||||
container_prep:
|
||||
|
|
|
@ -70,7 +70,6 @@ apt-get -y --no-install-recommends install \
|
|||
libva-dev \
|
||||
libvpx-dev \
|
||||
libvulkan-dev \
|
||||
libwayland-dev \
|
||||
libwebp-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
|
@ -132,7 +131,7 @@ git checkout -b snapshot 69e3cb83b3405edc99fcf9611f50012a4f210f78
|
|||
./setup.py install
|
||||
cd ..
|
||||
|
||||
git clone --branch 1.17.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland
|
||||
git clone --branch 1.18.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland
|
||||
export MAKEFLAGS="-j4"
|
||||
cd wayland
|
||||
git show -s HEAD
|
||||
|
|
|
@ -2078,6 +2078,17 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
|
|||
gl_format[1] = GL_BGRA_EXT;
|
||||
es->is_opaque = true;
|
||||
break;
|
||||
case WL_SHM_FORMAT_XYUV8888:
|
||||
/*
|
||||
* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian
|
||||
* a:b: g: r in SHADER_VARIANT_XYUV
|
||||
*/
|
||||
gs->shader_requirements.variant = SHADER_VARIANT_XYUV;
|
||||
pitch = wl_shm_buffer_get_stride(shm_buffer) / 4;
|
||||
gl_format[0] = GL_RGBA;
|
||||
gl_pixel_type = GL_UNSIGNED_BYTE;
|
||||
es->is_opaque = true;
|
||||
break;
|
||||
default:
|
||||
weston_log("warning: unknown shm buffer format: %08x\n",
|
||||
wl_shm_buffer_get_format(shm_buffer));
|
||||
|
@ -3674,6 +3685,7 @@ gl_renderer_display_create(struct weston_compositor *ec,
|
|||
wl_display_add_shm_format(ec->wl_display, WL_SHM_FORMAT_YUV420);
|
||||
wl_display_add_shm_format(ec->wl_display, WL_SHM_FORMAT_NV12);
|
||||
wl_display_add_shm_format(ec->wl_display, WL_SHM_FORMAT_YUYV);
|
||||
wl_display_add_shm_format(ec->wl_display, WL_SHM_FORMAT_XYUV8888);
|
||||
|
||||
wl_signal_init(&gr->destroy_signal);
|
||||
|
||||
|
|
|
@ -138,8 +138,8 @@ if dep_xkbcommon.version().version_compare('>= 0.5.0')
|
|||
config_h.set('HAVE_XKBCOMMON_COMPOSE', '1')
|
||||
endif
|
||||
|
||||
dep_wayland_server = dependency('wayland-server', version: '>= 1.17.0')
|
||||
dep_wayland_client = dependency('wayland-client', version: '>= 1.17.0')
|
||||
dep_wayland_server = dependency('wayland-server', version: '>= 1.18.0')
|
||||
dep_wayland_client = dependency('wayland-client', version: '>= 1.18.0')
|
||||
dep_pixman = dependency('pixman-1', version: '>= 0.25.2')
|
||||
dep_libinput = dependency('libinput', version: '>= 0.8.0')
|
||||
dep_libevdev = dependency('libevdev')
|
||||
|
|
Loading…
Reference in New Issue