From e23bfdb3298ec43ef895121527fb4d79474d7b1b Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Thu, 19 Jul 2012 08:54:05 -0400 Subject: wayland: Use existing EGL_TEXTURE_FORMAT for querying wl_buffer texture format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We also reuse EGL_TEXTURE_RGBA and EGL_TEXTURE_RGB, adding only the new planar YUV texture formats: EGL_TEXTURE_Y_U_V_WL, EGL_TEXTURE_Y_UV_WL and EGL_TEXTURE_Y_XUXV_WL. Signed-off-by: Kristian Høgsberg --- src/gallium/state_trackers/egl/common/egl_g3d_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/state_trackers/egl/common') diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c index f2e86de3147..b3941f2467b 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c @@ -888,13 +888,13 @@ egl_g3d_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *dpy, if (!wayland_buffer_is_drm(&buffer->buffer)) return EGL_FALSE; - if (attribute == EGL_WAYLAND_BUFFER_COMPONENTS_WL) { + if (attribute == EGL_TEXTURE_FORMAT) { switch (resource->format) { case PIPE_FORMAT_B8G8R8A8_UNORM: - *value = EGL_WAYLAND_BUFFER_RGBA_WL; + *value = EGL_TEXTURE_RGBA; return EGL_TRUE; case PIPE_FORMAT_B8G8R8X8_UNORM: - *value = EGL_WAYLAND_BUFFER_RGB_WL; + *value = EGL_TEXTURE_RGB; return EGL_TRUE; default: return EGL_FALSE; -- cgit v1.2.3