Brian Paul <[email protected]> writes: > On 05/08/2013 03:02 PM, Eric Anholt wrote: >> The previous piglit_link_simple_program() interface required you to >> compile your shaders up front, and tests routinely have issues with >> either not checking that the component shaders compiled, or not >> checking that the program linked, and then confusingly fail later in >> the test. This one enforces that the program actually compiled and >> linked before continuing, so you don't need to worry about error >> checking. >> --- >> tests/util/piglit-shader.c | 35 +++++++++++++++++++++++++++++++++++ >> tests/util/piglit-shader.h | 1 + >> 2 files changed, 36 insertions(+) >> >> diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c >> index ca48f41..d715bab 100644 >> --- a/tests/util/piglit-shader.c >> +++ b/tests/util/piglit-shader.c >> @@ -263,3 +263,38 @@ GLint piglit_link_simple_program(GLint vs, GLint fs) >> >> return prog; >> } >> + >> +/** >> + * Builds and links a program from optional VS and FS sources, >> + * throwing PIGLIT_FAIL on error. >> + */ >> +GLint >> +piglit_build_simple_program(const char *vs_source, const char *fs_source) > > How would you feel about adding a gs_source for geometry shaders too? > > Otherwise, > Reviewed-by: Brian Paul <[email protected]>
As long as we don't add tes/tcs as well, because damned if I'm ever going to remember what order they all go in.
pgp_I1_a2klz8.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
