[PATCH] xwayland: Set glamor filter to nearest

Markus Wick markus at selfnet.de
Thu Jan 15 14:04:42 PST 2015


glEGLImageTargetTexture2DOES only set the first level.
Mesa handles this new texture as incomplete and renders a black screen.
We also want to prevent linear filtering.

https://bugs.freedesktop.org/show_bug.cgi?id=81800

Signed-off-by: Markus Wick <markus at selfnet.de>
---
 hw/xwayland/xwayland-glamor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 09b454f..dd85518 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -137,6 +137,9 @@ xwl_glamor_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, int depth)
 
     glGenTextures(1, &xwl_pixmap->texture);
     glBindTexture(GL_TEXTURE_2D, xwl_pixmap->texture);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
     glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, xwl_pixmap->image);
     glBindTexture(GL_TEXTURE_2D, 0);
 
-- 
2.2.2



More information about the xorg-devel mailing list