From 09a0a936dbbd61c1baa6eb81ef81e4dbda7cc2f7 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Thu, 5 Apr 2012 22:31:44 +0800 Subject: gles2: Added 1555/2101010 formats support. Added color conversion code to support 1555/2101010 formats,now gles2 can pass the render check with all formats. We use 5551 to represent 1555, and do the revertion if downloading/uploading is needed. For 2101010, as gles2 doesn't support reading the identical formats. We have to use 8888 to represent, thus we may introduce some accurate problem. But anyway, we can pass the error checking in render check, so that may not be a big problem. Signed-off-by: Zhigang Gong --- src/glamor_priv.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/glamor_priv.h') diff --git a/src/glamor_priv.h b/src/glamor_priv.h index 828b08e..71d5bf0 100644 --- a/src/glamor_priv.h +++ b/src/glamor_priv.h @@ -633,13 +633,21 @@ void glamor_pixmap_ensure_fb(glamor_pixmap_fbo *fbo); enum glamor_pixmap_status glamor_upload_pixmap_to_texture(PixmapPtr pixmap); -/** +/** * Upload a picture to gl texture. Similar to the * glamor_upload_pixmap_to_texture. Used in rendering. **/ enum glamor_pixmap_status glamor_upload_picture_to_texture(PicturePtr picture); +/** + * Upload bits to a pixmap's texture. This function will + * convert the bits to the specified format/type format + * if the conversion is unavoidable. + **/ +Bool glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, GLenum type, + int no_alpha, int revert, int swap_rb, void *bits); + /** * Destroy all the resources allocated on the uploading * phase, includs the tex and fbo. -- cgit v1.2.3