diff options
author | Markus Wick <markus@selfnet.de> | 2015-01-15 22:03:18 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-01-17 07:47:53 +1300 |
commit | 5af2f5b7d2f955586d0cb40eb30812f1893db22e (patch) | |
tree | e4b055170a39dd8e3fddebcd52b804b50f3ac8f2 | |
parent | 5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1 (diff) |
xwayland: Set glamor filter to nearest
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@selfnet.de>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xwayland/xwayland-glamor.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |