[Piglit] [PATCH 1/2] glsl-1.10 / glsl-1.20: Don't use ortho in variable indexing tests.

Matt Turner mattst88 at gmail.com
Tue Jun 12 23:27:40 UTC 2018


On Tue, Jun 12, 2018 at 11:38 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 06/11/2018 11:22 PM, Jordan Justen wrote:
>> From: Matt Turner <mattst88 at gmail.com>
>>
>> Using ortho makes shrinking the window size much more difficult, which
>> makes running tests in simulation take much longer.
>>
>> Ref: https://lists.freedesktop.org/archives/piglit/2013-November/008298.html
>> [jordan.l.justen at intel.com: convert from shell script to mako]
>> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>> Cc: Kenneth Graunke <kenneth at whitecape.org>
>> ---
>>  .../templates/gen_variable_index_read_tests/helpers.mako   | 7 ++-----
>>  .../gen_variable_index_write_tests/fs.shader_test.mako     | 3 ---
>>  .../templates/gen_variable_index_write_tests/helpers.mako  | 4 ++--
>>  .../gen_variable_index_write_tests/vs.shader_test.mako     | 3 ---
>>  4 files changed, 4 insertions(+), 13 deletions(-)
>>
>> diff --git a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
>> index 155eb8c4e..3ca306daf 100644
>> --- a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
>> +++ b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
>> @@ -179,9 +179,6 @@ void main()
>>  <%def name="emit_test_vectors(params)" filter="dedent">
>>    <%block filter="newlines">
>>    [test]
>> -  clear color 0.5 0.5 0.5 0.5
>> -  clear
>> -  ortho
>>    % if params.mode == 'uniform' and params.glsl_version == 110 and params.test_array_dim == 0:
>>      uniform ${params.cxr_type} m ${matrix_data(1, params.matrix_dim, delim=' ')}
>>    % endif
>> @@ -220,8 +217,8 @@ void main()
>>            x = x_base + 15 * column - 10
>>            y = 15 * row - 10
>>          %>
>> -        draw rect ${x} ${y} 10 10
>> -        probe rgb ${x + 5} ${y + 5} 0.0 1.0 0.0
>> +        draw rect -1 -1 2 2
>> +        probe all rgb 0.0 1.0 0.0
>
> It's a little surprising that this helps performance.  If I'm reading
> this correctly, this test tries to draw a bunch of 10x10 blocks for each
> test.  This is getting replaced with redrawing the whole window.  This
> also weakens the test.  Since there's no clear between draws, if every
> draw after the first does nothing, the test will incorrectly pass.

As I said 5 years ago, this patch is not intended to improve
performance. It's to make shrinking window sizes simpler, which is
itself intended to improve performance.


More information about the Piglit mailing list