[Piglit] [PATCH] arb_xfb3: Fix draw_using_invalid_stream_index test
Chris Forbes
chrisf at ijw.co.nz
Tue Nov 18 21:46:42 PST 2014
Bump. Currently, this test does nothing useful due to the broken GS.
On Sat, Oct 18, 2014 at 9:11 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> - The GS declared no input layout so failed to compile. Apparently
> nVIDIA's implementation is sloppy about this.
> - The shaders were compiled and then never actually used.
> - Vertex data was similarly uploaded, and then never actually used.
>
> Just trim this down to the bare minimum required to hit the stream index
> out of range error, assuming an implementation which emits this error
> before checking if EndTransformFeedback has ever been called with the
> xfb object bound. This matches the error order in the spec.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> .../draw_using_invalid_stream_index.c | 30 ++--------------------
> 1 file changed, 2 insertions(+), 28 deletions(-)
>
> diff --git a/tests/spec/arb_transform_feedback3/draw_using_invalid_stream_index.c b/tests/spec/arb_transform_feedback3/draw_using_invalid_stream_index.c
> index 89f1e78..b159d1a 100644
> --- a/tests/spec/arb_transform_feedback3/draw_using_invalid_stream_index.c
> +++ b/tests/spec/arb_transform_feedback3/draw_using_invalid_stream_index.c
> @@ -38,26 +38,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
>
> PIGLIT_GL_TEST_CONFIG_END
>
> -static const char gs_text[] =
> - "#version 150\n"
> - "#extension GL_ARB_gpu_shader5 : enable\n"
> - "layout(points, max_vertices = 1, stream = 0) out;\n"
> - "\n"
> - "void main() {\n"
> - " gl_Position = gl_in[0].gl_Position;\n"
> - " EmitStreamVertex(0);\n"
> - "}\n";
> -
> void
> piglit_init(int argc, char **argv)
> {
> - static const float verts[] = {
> - -1.0f, -1.0f,
> - 1.0f, -1.0f,
> - -1.0f, 1.0f,
> - 1.0f, 1.0f,
> - };
> - GLuint vao, buf, tfb;
> + GLuint vao, tfb;
> GLint max_stream;
> bool pass;
>
> @@ -70,24 +54,14 @@ piglit_init(int argc, char **argv)
> piglit_report_result(PIGLIT_FAIL);
> }
>
> - piglit_build_simple_program_multiple_shaders(
> - GL_VERTEX_SHADER, vs_pass_thru_text,
> - GL_GEOMETRY_SHADER, gs_text, 0);
> -
> /* Test is run under desktop OpenGL 3.2 -> use of VAOs is required */
> glGenVertexArrays(1, &vao);
> glBindVertexArray(vao);
>
> - glGenBuffers(1, &buf);
> - glBindBuffer(GL_ARRAY_BUFFER, buf);
> - glBufferData(GL_ARRAY_BUFFER, sizeof(verts), verts, GL_STATIC_DRAW);
> - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL);
> - glEnableVertexAttribArray(0);
> -
> glGenTransformFeedbacks(1, &tfb);
> glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, tfb);
>
> - glDrawTransformFeedbackStream(GL_TRIANGLE_STRIP, tfb, max_stream);
> + glDrawTransformFeedbackStream(GL_POINTS, tfb, max_stream);
>
> pass = piglit_check_gl_error(GL_INVALID_VALUE);
>
> --
> 2.1.2
>
More information about the Piglit
mailing list