[Piglit] [PATCH 1/2] glsl-1.10 / glsl-1.20: Don't use ortho in variable indexing tests.
Ian Romanick
idr at freedesktop.org
Tue Jun 12 18:38:50 UTC 2018
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.
> </%block>
>
> % endfor
> diff --git a/generated_tests/templates/gen_variable_index_write_tests/fs.shader_test.mako b/generated_tests/templates/gen_variable_index_write_tests/fs.shader_test.mako
> index 1db0e5c69..f22ae888c 100644
> --- a/generated_tests/templates/gen_variable_index_write_tests/fs.shader_test.mako
> +++ b/generated_tests/templates/gen_variable_index_write_tests/fs.shader_test.mako
> @@ -33,8 +33,5 @@ void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; }
> ${helpers.emit_fs(params)}
>
> [test]
> -clear color 0.5 0.5 0.5 0.5
> -clear
> -ortho
>
> ${helpers.emit_test_vectors(params)}
> diff --git a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
> index 8d688a8c9..8f2ee13f1 100644
> --- a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
> +++ b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
> @@ -185,8 +185,8 @@ void main()
> x = x_base + 15 * c - 10
> y = 15 * r - 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
>
> ## This is replaced with a newline, after the formatting functions are applied
> >>newline
> diff --git a/generated_tests/templates/gen_variable_index_write_tests/vs.shader_test.mako b/generated_tests/templates/gen_variable_index_write_tests/vs.shader_test.mako
> index 06e539cfc..9b2cf56e1 100644
> --- a/generated_tests/templates/gen_variable_index_write_tests/vs.shader_test.mako
> +++ b/generated_tests/templates/gen_variable_index_write_tests/vs.shader_test.mako
> @@ -67,8 +67,5 @@ void main()
> </%block>
>
> [test]
> -clear color 0.5 0.5 0.5 0.5
> -clear
> -ortho
>
> ${helpers.emit_test_vectors(params)}
>
More information about the Piglit
mailing list