From 2766ae7e97d57d01da773d28e41f293fbd9c80bb Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 22 Aug 2018 10:58:02 +1000 Subject: [PATCH] only set texture params for non multisample surfaces Reviewed-by: Jakob Bornecrantz Signed-off-by: Jakob Bornecrantz --- src/vrend_blitter.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c index d280f79..a4077c8 100644 --- a/src/vrend_blitter.c +++ b/src/vrend_blitter.c @@ -797,14 +797,19 @@ void vrend_renderer_blit_gl(UNUSED struct vrend_context *ctx, if (has_texture_srgb_decode && util_format_is_srgb(src_res->base.format)) glTexParameteri(src_res->target, GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); - glTexParameteri(src_res->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(src_res->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(src_res->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + if (src_res->base.nr_samples <= 1) { + glTexParameteri(src_res->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(src_res->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(src_res->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + } glTexParameteri(src_res->target, GL_TEXTURE_BASE_LEVEL, info->src.level); glTexParameteri(src_res->target, GL_TEXTURE_MAX_LEVEL, info->src.level); - glTexParameterf(src_res->target, GL_TEXTURE_MAG_FILTER, filter); - glTexParameterf(src_res->target, GL_TEXTURE_MIN_FILTER, filter); + + if (src_res->base.nr_samples <= 1) { + glTexParameterf(src_res->target, GL_TEXTURE_MAG_FILTER, filter); + glTexParameterf(src_res->target, GL_TEXTURE_MIN_FILTER, filter); + } pos_loc = glGetAttribLocation(prog_id, "arg0"); tc_loc = glGetAttribLocation(prog_id, "arg1"); samp_loc = glGetUniformLocation(prog_id, "samp");