struct glthread_vao {
GLuint Name;
GLuint CurrentElementBufferName;
- GLbitfield Enabled;
+ GLbitfield UserEnabled; /**< Vertex attrib arrays enabled by the user. */
+ GLbitfield Enabled; /**< UserEnabled with POS vs GENERIC0 aliasing resolved. */
GLbitfield UserPointerMask;
GLbitfield NonZeroDivisorMask;
};
vao->CurrentElementBufferName = 0;
+ vao->UserEnabled = 0;
vao->Enabled = 0;
vao->UserPointerMask = 0;
vao->NonZeroDivisorMask = 0;
return;
if (enable)
- vao->Enabled |= 1u << attrib;
+ vao->UserEnabled |= 1u << attrib;
else
- vao->Enabled &= ~(1u << attrib);
+ vao->UserEnabled &= ~(1u << attrib);
+
+ /* The generic0 attribute superseeds the position attribute */
+ vao->Enabled = vao->UserEnabled;
+ if (vao->Enabled & VERT_BIT_GENERIC0)
+ vao->Enabled &= ~VERT_BIT_POS;
}
void _mesa_glthread_AttribDivisor(struct gl_context *ctx, const GLuint *vaobj,