diff options
author | Mario Kleiner <[email protected]> | 2017-12-15 23:04:48 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-01-03 22:57:55 +0100 |
commit | 6945f313c4647d60b914dec7d201b807f2ebf271 (patch) | |
tree | b0fd849b157dabf9efd9a9530f56161e31ab7d3a /src/mesa/drivers | |
parent | ad218754c79e0af61d5ba225a4b195cb55c2cac9 (diff) |
i965: Support xrgb/argb2101010 formats for glx_texture_from_pixmap.
Makes compositing under X11/GLX work.
Signed-off-by: Mario Kleiner <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 37c8e24f032..2ee36583c46 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -464,11 +464,19 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, if (rb->mt->cpp == 4) { if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { internal_format = GL_RGB; - texFormat = MESA_FORMAT_B8G8R8X8_UNORM; + if (rb->mt->format == MESA_FORMAT_B10G10R10X2_UNORM || + rb->mt->format == MESA_FORMAT_B10G10R10A2_UNORM) + texFormat = MESA_FORMAT_B10G10R10X2_UNORM; + else + texFormat = MESA_FORMAT_B8G8R8X8_UNORM; } else { internal_format = GL_RGBA; - texFormat = MESA_FORMAT_B8G8R8A8_UNORM; + if (rb->mt->format == MESA_FORMAT_B10G10R10X2_UNORM || + rb->mt->format == MESA_FORMAT_B10G10R10A2_UNORM) + texFormat = MESA_FORMAT_B10G10R10A2_UNORM; + else + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; } } else if (rb->mt->cpp == 2) { internal_format = GL_RGB; |