[PATCH 6/7] glamor: Re-enable a8 textures for GLES2
Maarten Lankhorst
maarten.lankhorst at ubuntu.com
Mon Jan 12 06:29:36 PST 2015
This will probably break PVR, but fixes other implementations.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
glamor/glamor_pixmap.c | 10 ++--------
glamor/glamor_utils.h | 6 +-----
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
index 1c53ee1..7413fd2 100644
--- a/glamor/glamor_pixmap.c
+++ b/glamor/glamor_pixmap.c
@@ -708,10 +708,7 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex,
glamor_make_current(glamor_priv);
if (*tex == 0) {
glGenTextures(1, tex);
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
- iformat = gl_iformat_for_pixmap(pixmap);
- else
- iformat = format;
+ iformat = gl_iformat_for_pixmap(pixmap);
non_sub = 1;
assert(x == 0 && y == 0);
}
@@ -894,10 +891,7 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha,
|| (flag == 0 && pixmap_priv->base.fbo && pixmap_priv->base.fbo->fb))
return 0;
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
- iformat = gl_iformat_for_pixmap(pixmap);
- else
- iformat = format;
+ iformat = gl_iformat_for_pixmap(pixmap);
if (!glamor_pixmap_ensure_fbo(pixmap, iformat, flag))
return -1;
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index c15d17c..56e4082 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -794,11 +794,7 @@ format_for_depth(int depth)
static inline GLenum
gl_iformat_for_pixmap(PixmapPtr pixmap)
{
- glamor_screen_private *glamor_priv =
- glamor_get_screen_private(pixmap->drawable.pScreen);
-
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP &&
- (pixmap->drawable.depth == 1 || pixmap->drawable.depth == 8)) {
+ if (pixmap->drawable.depth == 1 || pixmap->drawable.depth == 8) {
return GL_ALPHA;
} else {
return GL_RGBA;
--
2.2.1
More information about the xorg-devel
mailing list