<div dir="auto"><div dir="auto">Hi Nicolai,</div><div dir="auto"><br></div><div>Re-replying as I seem to have messed up the quoting. Anyway a question about a loop index below.<br><div class="gmail_extra"><br><div class="gmail_quote">Den 13 apr. 2017 21:29 skrev "Nicolai Hähnle" <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br></blockquote></div></div></div><div dir="auto">[snip]</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
+/**<br>
+ * Called to error check the function parameters.</blockquote></div></div></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ *<br>
+ * Note that glMultiDrawArrays is not part of GLES, so there's limited scope<br>
+ * for sharing code with the validation of glDrawArrays.<br>
+ */<br>
+bool<br>
+_mesa_validate_<wbr>MultiDrawArrays(struct gl_context *ctx, GLenum mode,<br>
+ const GLsizei *count, GLsizei primcount)<br>
+{<br>
+ int i;<br>
+<br>
+ FLUSH_CURRENT(ctx, 0);<br>
+<br>
+ if (!_mesa_valid_prim_mode(ctx, mode, "glMultiDrawArrays"))<br>
+ return false;<br>
+<br>
+ if (!check_valid_to_render(ctx, "glMultiDrawArrays"))<br>
+ return false;<br>
+<br>
+ if (primcount < 0) {<br>
+ _mesa_error(ctx, GL_INVALID_VALUE, "glMultiDrawArrays(primcount=%<wbr>d)",<br>
+ primcount);<br>
+ return false;<br>
+ }<br>
+<br>
+ for (i = 0; i < primcount; ++i) {<br>
+ if (count[i] < 0) {<br>
+ _mesa_error(ctx, GL_INVALID_VALUE, "glMultiDrawArrays(count[%d]=%<wbr>d)",<br>
+ i, count[i]);<br>
+ return false;<br>
+ }<br>
+ }<br>
+<br>
+ if (need_xfb_remaining_prims_<wbr>check(ctx)) {<br>
+ struct gl_transform_feedback_object *xfb_obj<br>
+ = ctx->TransformFeedback.<wbr>CurrentObject;<br>
+ size_t prim_count = 0;<br>
+<br>
+ for (i = 0; i < prim_count; ++i)<br>
+ prim_count += vbo_count_tessellated_<wbr>primitives(mode, count[i], 1);<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">As prim_count is 0 the above loop will iterate 0 times, perhaps a mixup with primcount?</div><div dir="auto"><br></div><div dir="auto">BR</div><div dir="auto">Nils</div><div dir="auto"><br></div><div dir="auto">[snip]</div><div dir="auto"><br></div></div>