[Mesa-dev] [PATCH 8/8] egl_dri2: Set content type for wl_buffer
Kristian Høgsberg
krh at bitplanet.net
Thu Jul 5 14:50:08 PDT 2012
This lets the compositor know about the structure of the wl_buffer, namely
which planes and components are available and in which order.
---
src/egl/drivers/dri2/egl_dri2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index ec2106a..90e6c15 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1306,15 +1306,19 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name,
switch (buffer->format) {
case WL_DRM_FORMAT_ARGB8888:
buffer->driver_format =__DRI_IMAGE_FORMAT_ARGB8888;
+ buffer->buffer.content = WL_BUFFER_CONTENT_RGBA;
break;
case WL_DRM_FORMAT_XRGB8888:
buffer->driver_format = __DRI_IMAGE_FORMAT_XRGB8888;
+ buffer->buffer.content = WL_BUFFER_CONTENT_RGB;
break;
case WL_DRM_FORMAT_YUV420:
buffer->driver_format =__DRI_IMAGE_FORMAT_YUV420;
+ buffer->buffer.content = WL_BUFFER_CONTENT_PLANAR_YUV;
break;
case WL_DRM_FORMAT_NV12:
buffer->driver_format = __DRI_IMAGE_FORMAT_NV12;
+ buffer->buffer.content = WL_BUFFER_CONTENT_NV;
break;
default:
return;
--
1.7.10.2
More information about the mesa-dev
mailing list