<div dir="ltr">On 6 November 2013 23:06, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>><br>
---<br>
src/mesa/vbo/vbo.h | 3 ++-<br>
src/mesa/vbo/vbo_exec_array.c | 5 +++++<br>
2 files changed, 7 insertions(+), 1 deletion(-)<br></blockquote><div><br></div><div>It looks to me like you forgot to update the code in the following functions set is_indirect to 0:<br><br>- vbo_exec_Begin()<br>- _save_wrap_buffers()<br>
- vbo_save_NotifyBegin()<br><br></div><div>(Unless there's some code I'm not seeing that memsets the prim data structure to 0).<br><br></div><div>With that fixed, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div><div><br></div><div>For completeness we might want to also update these functions, but it's not strictly necessary because they memset the prim data structure to 0:<br></div><div><br>- vbo_validated_multidrawelements()<br>
- vbo_draw_transform_feedback()<br>- vbo_draw_arrays()<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h<br>
index 113374a..942b34a 100644<br>
--- a/src/mesa/vbo/vbo.h<br>
+++ b/src/mesa/vbo/vbo.h<br>
@@ -46,7 +46,8 @@ struct _mesa_prim {<br>
GLuint end:1;<br>
GLuint weak:1;<br>
GLuint no_current_update:1;<br>
- GLuint pad:19;<br>
+ GLuint is_indirect:1;<br>
+ GLuint pad:18;<br>
<br>
GLuint start;<br>
GLuint count;<br>
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c<br>
index 7aa0ad2..40c435d 100644<br>
--- a/src/mesa/vbo/vbo_exec_array.c<br>
+++ b/src/mesa/vbo/vbo_exec_array.c<br>
@@ -965,6 +965,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,<br>
prim[0].start = 0;<br>
prim[0].count = count;<br>
prim[0].indexed = 1;<br>
+ prim[0].is_indirect = 0;<br>
prim[0].basevertex = basevertex;<br>
prim[0].num_instances = numInstances;<br>
prim[0].base_instance = baseInstance;<br>
@@ -1578,6 +1579,7 @@ vbo_validated_drawarraysindirect(struct gl_context *ctx,<br>
prim[0].begin = 1;<br>
prim[0].end = 1;<br>
prim[0].mode = mode;<br>
+ prim[0].is_indirect = 1;<br>
prim[0].indirect_offset = (GLsizeiptr)indirect;<br>
<br>
/* NOTE: We do NOT want to handle primitive restart here, nor perform any<br>
@@ -1623,6 +1625,7 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,<br>
for (i = 0; i < primcount; ++i, offset += stride) {<br>
prim[i].mode = mode;<br>
prim[i].indirect_offset = offset;<br>
+ prim[i].is_indirect = 1;<br>
}<br>
<br>
check_buffers_are_unmapped(exec->array.inputs);<br>
@@ -1660,6 +1663,7 @@ vbo_validated_drawelementsindirect(struct gl_context *ctx,<br>
prim[0].mode = mode;<br>
prim[0].indexed = 1;<br>
prim[0].indirect_offset = (GLsizeiptr)indirect;<br>
+ prim[0].is_indirect = 1;<br>
<br>
check_buffers_are_unmapped(exec->array.inputs);<br>
vbo->draw_prims(ctx, prim, 1,<br>
@@ -1708,6 +1712,7 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,<br>
prim[i].mode = mode;<br>
prim[i].indexed = 1;<br>
prim[i].indirect_offset = offset;<br>
+ prim[i].is_indirect = 1;<br>
}<br>
<br>
check_buffers_are_unmapped(exec->array.inputs);<br>
<span class=""><font color="#888888">--<br>
1.8.4.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>