Module: Mesa
Branch: master
Commit: 17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1

Author: Miklós Máté <mtm...@gmail.com>
Date:   Sun Jun 26 13:48:00 2016 -0600

swrast: fix active attribs with atifragshader

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é <mtm...@gmail.com>
Reviewed-by: Brian Paul <bri...@vmware.com>

---

 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 0a5fc7e..a63179c 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 */

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to