From 596e794616462d312ccef1baf7c263e454e03516 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 5 Mar 2019 09:57:00 +0100 Subject: [PATCH] blitter: Don't try to disable sRGB linearization for MSAA textures This is not supported and will issue a warning. Signed-off-by: Gert Wollny Reviewed-by: Gurchetan Singh --- src/vrend_blitter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c index e5f3c16..d504068 100644 --- a/src/vrend_blitter.c +++ b/src/vrend_blitter.c @@ -805,8 +805,9 @@ void vrend_renderer_blit_gl(struct vrend_context *ctx, } /* Just make sure that no stale state disabled decoding */ - 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); + if (has_texture_srgb_decode && util_format_is_srgb(info->src.format) && + src_res->base.nr_samples < 2) + glTexParameteri(src_res->target, GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); if (src_res->base.nr_samples <= 1) { glTexParameteri(src_res->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);