summaryrefslogtreecommitdiff
path: root/glamor/glamor.c
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2018-09-06 15:38:14 -0700
committerAdam Jackson <ajax@redhat.com>2018-09-11 15:54:57 -0400
commit44f5885686a30776160891e09cd4453afb9d5ade (patch)
tree6cabd48b230da9c502fe0ec5a52c0c0d05bc7be9 /glamor/glamor.c
parentf98ff253c722da3f5ad747e6813752f9e74c54b5 (diff)
glamor: add support for GL_RG
Allow to upload the CbCr plane of an NV12 image into a GL texture. Signed-off-by: Julien Isorce <jisorce@oblong.com> Tested-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r--glamor/glamor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 9bf1707de..f24cc9fd1 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -204,6 +204,8 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
pixmap_priv = glamor_get_pixmap_private(pixmap);
+ pixmap_priv->is_cbcr = (usage == GLAMOR_CREATE_FORMAT_CBCR);
+
format = gl_iformat_for_pixmap(pixmap);
pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;