From 38b41fd718cfffd11dab637d9d0cbd6c2a30b2c2 Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Sat, 27 Jan 2018 16:07:22 +0100 Subject: mesa: Use defines for the aliased material array attributes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of just assuming that the material attributes just overlap with the generic attributes 0-12, give them symbolic defines so that we can easier move them to an other range. Signed-off-by: Mathias Fröhlich Reviewed-by: Brian Paul --- src/mesa/vbo/vbo_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/vbo/vbo_context.c') diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 3f55e27f9be..4fa6f62ad09 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -249,8 +249,8 @@ _vbo_CreateContext(struct gl_context *ctx) for (i = 0; i < ARRAY_SIZE(vbo->map_vp_none); i++) vbo->map_vp_none[i] = i; /* map material attribs to generic slots */ - for (i = 0; i < MAT_ATTRIB_MAX; i++) - vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)] + for (i = 0; i < VERT_ATTRIB_MAT_MAX; i++) + vbo->map_vp_none[VERT_ATTRIB_MAT(i)] = VBO_ATTRIB_MAT_FRONT_AMBIENT + i; for (i = 0; i < ARRAY_SIZE(vbo->map_vp_arb); i++) -- cgit v1.2.3