[Piglit] [PATCH 2/4] util: Make an even simpler interface for building simple shaders.
Eric Anholt
eric at anholt.net
Wed May 8 17:12:42 PDT 2013
Brian Paul <brianp at vmware.com> 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 <brianp at vmware.com>
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130508/1928ec10/attachment.pgp>
More information about the Piglit
mailing list