From 9c39ea796cd689670ab17e0c5dcc0c0b76db2cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 29 Aug 2023 16:06:26 +0200 Subject: [PATCH] virgl: Do not expose EXT_texture_mirror_clamp when using a GLES host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GL_MIRROR_CLAMP_EXT wrap parameter is never available in GLES. This fixes the `spec@!opengl 1.1@texwrap 2d proj` piglit test when using a GLES host. Signed-off-by: Corentin Noël Reviewed-by: Filip Gawin Cc: mesa-stable Part-of: --- src/gallium/drivers/virgl/virgl_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index c428cd53c25..ca1913035df 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -93,6 +93,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_OCCLUSION_QUERY: return vscreen->caps.caps.v1.bset.occlusion_query; case PIPE_CAP_TEXTURE_MIRROR_CLAMP: + return vscreen->caps.caps.v1.bset.mirror_clamp && + vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES ? 0 : 1; case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE: return vscreen->caps.caps.v1.bset.mirror_clamp; case PIPE_CAP_TEXTURE_SWIZZLE: