[Mesa-dev] [PATCH 03/11] mesa: add is_indirect to _mesa_prim
Chris Forbes
chrisf at ijw.co.nz
Mon Nov 4 01:09:44 PST 2013
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/vbo/vbo.h | 3 ++-
src/mesa/vbo/vbo_exec_array.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 113374a..942b34a 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -46,7 +46,8 @@ struct _mesa_prim {
GLuint end:1;
GLuint weak:1;
GLuint no_current_update:1;
- GLuint pad:19;
+ GLuint is_indirect:1;
+ GLuint pad:18;
GLuint start;
GLuint count;
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 7aa0ad2..40c435d 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -965,6 +965,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
prim[0].start = 0;
prim[0].count = count;
prim[0].indexed = 1;
+ prim[0].is_indirect = 0;
prim[0].basevertex = basevertex;
prim[0].num_instances = numInstances;
prim[0].base_instance = baseInstance;
@@ -1578,6 +1579,7 @@ vbo_validated_drawarraysindirect(struct gl_context *ctx,
prim[0].begin = 1;
prim[0].end = 1;
prim[0].mode = mode;
+ prim[0].is_indirect = 1;
prim[0].indirect_offset = (GLsizeiptr)indirect;
/* NOTE: We do NOT want to handle primitive restart here, nor perform any
@@ -1623,6 +1625,7 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,
for (i = 0; i < primcount; ++i, offset += stride) {
prim[i].mode = mode;
prim[i].indirect_offset = offset;
+ prim[i].is_indirect = 1;
}
check_buffers_are_unmapped(exec->array.inputs);
@@ -1660,6 +1663,7 @@ vbo_validated_drawelementsindirect(struct gl_context *ctx,
prim[0].mode = mode;
prim[0].indexed = 1;
prim[0].indirect_offset = (GLsizeiptr)indirect;
+ prim[0].is_indirect = 1;
check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, prim, 1,
@@ -1708,6 +1712,7 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,
prim[i].mode = mode;
prim[i].indexed = 1;
prim[i].indirect_offset = offset;
+ prim[i].is_indirect = 1;
}
check_buffers_are_unmapped(exec->array.inputs);
--
1.8.4.2
More information about the mesa-dev
mailing list