From e95a540a0ebb30178dc63ff52b4a436fe30f6549 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 23 Jan 2019 14:00:50 +0100 Subject: [PATCH] renderer: set emulated alpha based on the texture-view format Texture views with emulated alpha also needs to get their border-color swizzled. So let's check the texture-view instead of the resource. Signed-off-by: Erik Faye-Lund Reviewed-by: Gurchetan Singh Signed-off-by: Dave Airlie --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 17c8b8a..fac61d4 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -4975,7 +4975,7 @@ static void vrend_apply_sampler_state(struct vrend_context *ctx, * the sampler to use the red channel and not the alpha one * by swizzling the GL_TEXTURE_BORDER_COLOR parameter. */ - bool is_emulated_alpha = vrend_format_is_emulated_alpha(res->base.format); + bool is_emulated_alpha = vrend_format_is_emulated_alpha(tview->format); if (has_feature(feat_samplers)) { int sampler = vstate->ids[tview->srgb_decode == GL_SKIP_DECODE_EXT ? 0 : 1]; if (is_emulated_alpha) {