From 17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mikl=C3=B3s=20M=C3=A1t=C3=A9?= Date: Sun, 26 Jun 2016 13:48:00 -0600 Subject: [PATCH] swrast: fix active attribs with atifragshader MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only include the ones that can be used by the shader. This fixes texture coordinates, which were completely wrong, because WPOS was included in the list of attribs. It also increases performance noticeably. Signed-off-by: Miklós Máté Reviewed-by: Brian Paul --- src/mesa/swrast/s_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 0a5fc7e9329..a63179c05f3 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -504,7 +504,8 @@ _swrast_update_active_attribs(struct gl_context *ctx) attribsMask &= ~VARYING_BIT_POS; /* WPOS is always handled specially */ } else if (ctx->ATIFragmentShader._Enabled) { - attribsMask = ~0; /* XXX fix me */ + attribsMask = VARYING_BIT_COL0 | VARYING_BIT_COL1 | + VARYING_BIT_FOGC | VARYING_BITS_TEX_ANY; } else { /* fixed function */ -- 2.30.2