summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo.h1
-rw-r--r--src/mesa/vbo/vbo_exec_array.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 00e843c9a0f..cef3b8cd792 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -58,6 +58,7 @@ struct _mesa_prim {
GLint basevertex;
GLuint num_instances;
GLuint base_instance;
+ GLuint draw_id;
GLsizeiptr indirect_offset;
};
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index e27fdd90532..502b2885892 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1341,6 +1341,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
prim[i].indexed = 1;
prim[i].num_instances = 1;
prim[i].base_instance = 0;
+ prim[i].draw_id = i;
prim[i].is_indirect = 0;
if (basevertex != NULL)
prim[i].basevertex = basevertex[i];
@@ -1371,6 +1372,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
prim[0].indexed = 1;
prim[0].num_instances = 1;
prim[0].base_instance = 0;
+ prim[0].draw_id = i;
prim[0].is_indirect = 0;
if (basevertex != NULL)
prim[0].basevertex = basevertex[i];
@@ -1598,6 +1600,7 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,
prim[i].mode = mode;
prim[i].indirect_offset = offset;
prim[i].is_indirect = 1;
+ prim[i].draw_id = i;
}
check_buffers_are_unmapped(exec->array.inputs);
@@ -1684,6 +1687,7 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,
prim[i].indexed = 1;
prim[i].indirect_offset = offset;
prim[i].is_indirect = 1;
+ prim[i].draw_id = i;
}
check_buffers_are_unmapped(exec->array.inputs);