From 5af2f5b7d2f955586d0cb40eb30812f1893db22e Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 15 Jan 2015 22:03:18 +0100 Subject: xwayland: Set glamor filter to nearest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard --- 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 09b454f8a..dd8551840 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); -- cgit v1.2.3