mesa/vbo: fix check for zero aliases with 2/10/10/10
authorDave Airlie <airlied@redhat.com>
Tue, 10 May 2016 01:06:47 +0000 (11:06 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 10 May 2016 04:24:49 +0000 (14:24 +1000)
This fixes:
GL33-CTS.gtf33.GL3Tests.vertex_type_2_10_10_10_rev.vertex_type_2_10_10_10_rev_attrib

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/vbo/vbo_attrib_tmp.h

index e73b8fb5ff1fb554053e248b5051866ea73f9c0e..ed0b2deda4226b22490a6b8017184742c5f7acce 100644 (file)
@@ -226,7 +226,7 @@ static inline float conv_i2_to_norm_float(const struct gl_context *ctx, int i2)
    } while(0)
 
 #define ATTR_UI_INDEX(ctx, val, type, normalized, index, arg) do {     \
-      if ((index) == 0) {                                      \
+      if ((index) == 0 && _mesa_attr_zero_aliases_vertex(ctx)) {       \
         ATTR_UI(ctx, val, (type), normalized, 0, (arg));               \
       } else if ((index) < MAX_VERTEX_GENERIC_ATTRIBS) {               \
         ATTR_UI(ctx, val, (type), normalized, VBO_ATTRIB_GENERIC0 + (index), (arg)); \