[Piglit] [PATCH] arb_dsa: avoid non-determinism in create-programpipelines subtests
Ilia Mirkin
imirkin at alum.mit.edu
Wed Jun 17 19:37:31 PDT 2015
Right now the default label size test fails due to mesa not implementing
the call, and length is uninitialized, which causes the subtest name to
keep changing. A well-behaved impl won't modify the param on error, so
initialize it to a known-bad value.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
tests/spec/arb_direct_state_access/create-programpipelines.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/spec/arb_direct_state_access/create-programpipelines.c b/tests/spec/arb_direct_state_access/create-programpipelines.c
index 981c206..c9992e2 100644
--- a/tests/spec/arb_direct_state_access/create-programpipelines.c
+++ b/tests/spec/arb_direct_state_access/create-programpipelines.c
@@ -87,27 +87,32 @@ piglit_display(void)
SUBTESTCONDITION(glIsProgramPipeline(ids[2]), pass,
"IsProgramPipeline()");
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_ACTIVE_PROGRAM, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"default active program(%d) == 0", param);
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_VERTEX_SHADER, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"default vertex shader program(%d) == 0", param);
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_GEOMETRY_SHADER, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"default geometry shader program(%d) == 0", param);
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_FRAGMENT_SHADER, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"default fragment shader program(%d) == 0", param);
if (piglit_is_extension_supported("GL_ARB_compute_shader")) {
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_COMPUTE_SHADER, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
@@ -119,11 +124,13 @@ piglit_display(void)
}
if (piglit_is_extension_supported("GL_ARB_tessellation_shader")) {
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_TESS_CONTROL_SHADER, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"default TCS(%d) == 0", param);
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_TESS_EVALUATION_SHADER,
¶m);
piglit_check_gl_error(GL_NO_ERROR);
@@ -137,16 +144,19 @@ piglit_display(void)
"default TES == 0");
}
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_VALIDATE_STATUS, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == GL_FALSE, pass,
"default validate status(%d) == FALSE", param);
+ param = -1;
glGetProgramPipelineiv(ids[2], GL_INFO_LOG_LENGTH, ¶m);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(param == 0, pass,
"startup log length(%d) == 0", param);
+ length = -1;
glGetObjectLabel(GL_PROGRAM_PIPELINE, ids[2], 11, &length, label);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(length == 0, pass,
--
2.3.6
More information about the Piglit
mailing list