[Mesa-dev] [PATCH 4/7] intel: image: add support for more formats.
Gwenole Beauchesne
gb.devel at gmail.com
Tue Apr 24 08:30:36 PDT 2012
Add mappings for:
- DRI_IMAGE_FORMAT_R8
- DRI_IMAGE_FORMAT_RG88
- DRI_IMAGE_FORMAT_L8
- DRI_IMAGE_FIRLAT_LA88
---
src/mesa/drivers/dri/intel/intel_screen.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index d0bf4f5..2453d49 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -211,6 +211,26 @@ intel_create_image_from_name2(__DRIscreen *screen,
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
+ case __DRI_IMAGE_FORMAT_R8:
+ image->format = MESA_FORMAT_R8;
+ image->internal_format = GL_RED;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_RG88:
+ image->format = MESA_FORMAT_GR88;
+ image->internal_format = GL_RG;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_L8:
+ image->format = MESA_FORMAT_L8;
+ image->internal_format = GL_LUMINANCE;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_LA88:
+ image->format = MESA_FORMAT_AL88;
+ image->internal_format = GL_LUMINANCE_ALPHA;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
default:
free(image);
return NULL;
--
1.7.5.4
More information about the mesa-dev
mailing list