<div dir="ltr">On 13 August 2013 11:56, Jacob Penner <span dir="ltr"><<a href="mailto:jkpenner91@gmail.com" target="_blank">jkpenner91@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Passing an offset of type int typedcast to GLvoid* to<br>
glMultiDrawElementsBaseVertex would result in function<br>
receiving incorrect data.<br></blockquote><div><br></div><div>The commit subject and message make it sound like the only change was to the type of indices_offset.  The other two changes (checking for errors and dropping the unnecessary call to piglit_ortho_projection()) should be briefly mentioned too.<br>
<br>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> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

---<br>
 .../multi-draw-elements-base-vertex.c                        | 12 ++++++++----<br>
 1 file changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c b/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c<br>
index 1d51b53..8fdd666 100644<br>
--- a/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c<br>
+++ b/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c<br>
@@ -105,8 +105,8 @@ static GLuint indices[] = {<br>
 };<br>
 static GLsizei indices_size = sizeof(indices);<br>
<br>
-static int indices_offset[] = {<br>
-       0, 6 * sizeof(GLuint)<br>
+static const GLvoid * const indices_offset[] = {<br>
+       (GLvoid*) 0, (GLvoid*)(6 * sizeof(GLuint))<br>
 };<br>
 static GLsizei indices_count[] = {<br>
        6, 6<br>
@@ -124,8 +124,6 @@ piglit_init(int argc, char **argv)<br>
                piglit_require_extension("GL_ARB_draw_elements_base_vertex");<br>
        }<br>
<br>
-       piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);<br>
-<br>
        /* Create program */<br>
        program = piglit_build_simple_program(vs_source, fs_source);<br>
        glUseProgram(program);<br>
@@ -153,6 +151,9 @@ piglit_init(int argc, char **argv)<br>
        glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);<br>
        glEnableVertexAttribArray(vertex_index);<br>
        glVertexAttribPointer(vertex_index, 2, GL_FLOAT, GL_FALSE, 0, 0);<br>
+<br>
+       if(!piglit_check_gl_error(GL_NO_ERROR))<br>
+               piglit_report_result(PIGLIT_FAIL);<br>
 }<br>
<br>
 enum piglit_result<br>
@@ -178,6 +179,9 @@ piglit_display(void)<br>
        pass = piglit_probe_pixel_rgb(100,  75, blue) && pass;<br>
        pass = piglit_probe_pixel_rgb(100,  25, green) && pass;<br>
<br>
+       if(!piglit_check_gl_error(GL_NO_ERROR))<br>
+               pass = false;<br>
+<br>
        piglit_present_results();<br>
<br>
        return pass ? PIGLIT_PASS : PIGLIT_FAIL;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>