[Piglit] [PATCH 1/2] Modify shader attachment order in piglit_link_simple_program()

Paul Berry stereotype441 at gmail.com
Wed Nov 2 15:46:26 PDT 2011


On 2 November 2011 14:54, Ian Romanick <idr at freedesktop.org> wrote:

> On 11/01/2011 02:27 PM, Paul Berry wrote:
>
>> Some tests (in particular, glsl-link-initializer-03.c) assume that
>> piglit_link_simple_program() attaches shaders in the same order that
>> they appear in the parameter list.  There's no good reason for
>> piglit_link_simple_program() to attach them in the opposite order.
>> ---
>>  tests/util/piglit-shader.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
>> index c5c8c2d..3e0f935 100644
>> --- a/tests/util/piglit-shader.c
>> +++ b/tests/util/piglit-shader.c
>> @@ -240,10 +240,10 @@ GLint piglit_link_simple_program(**GLint vs, GLint
>> fs)
>>        piglit_require_GLSL();
>>
>>        prog = piglit_CreateProgram();
>> -       if (fs)
>> -               piglit_AttachShader(prog, fs);
>>        if (vs)
>>                piglit_AttachShader(prog, vs);
>> +       if (fs)
>> +               piglit_AttachShader(prog, fs);
>>        piglit_LinkProgram(prog);
>>
>>        if (!piglit_link_check_status(**prog)) {
>>
>
> Since there is an ordering dependency, would it maybe better to just have
> the test try linking the shaders in "all" the different orders? This would
> mean making more programs, but that should't be a problem.
>
>    prog_a = piglit_link_simple_program(**vert[0], vert[1]);
>    prog_b = piglit_link_simple_program(**vert[1], vert[0]);
>    prog_c = piglit_link_simple_program(**vert[0], vert[2]);
>    prog_d = piglit_link_simple_program(**vert[2], vert[0]);
>

Sure, I would be fine with this.  Can I take that as a "reviewed-by"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111102/87ff79a1/attachment.htm>


More information about the Piglit mailing list