[Piglit] [PATCH] Add a test to reproduce a crash when running gzdoom on Ironlake.

Eric Anholt eric at anholt.net
Tue Apr 24 13:24:01 PDT 2012


On Tue, 24 Apr 2012 00:32:27 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48218
> ---
>  tests/all.tests                      |    1 +
>  tests/shaders/CMakeLists.gl.txt      |    1 +
>  tests/shaders/depth-test-and-write.c |   75 ++++++++++++++++++++++++++++++++++
>  3 files changed, 77 insertions(+)
>  create mode 100644 tests/shaders/depth-test-and-write.c
> 
> diff --git a/tests/all.tests b/tests/all.tests
> index dd61b5a..3a4d16c 100644
> --- a/tests/all.tests
> +++ b/tests/all.tests
> @@ -356,6 +356,7 @@ add_plain_test(shaders, 'ati-fs-bad-delete')
>  add_plain_test(shaders, 'attribute0')
>  add_plain_test(shaders, 'createshaderprogram-bad-type')
>  add_plain_test(shaders, 'createshaderprogram-attached-shaders')
> +add_plain_test(shaders, 'depth-test-and-write')

non-concurrent?

Might want to call it fs-modify-source-depth or something -- part of
what triggers the bug is that you're using source depth along with
writing destination depth.

> +void
> +piglit_init(int argc, char **argv)
> +{
> +	const char *vs_source = "void main() { gl_Position = gl_Vertex; }";
> +	const char *fs_source =
> +		"void main()"
> +		"{"
> +		"	gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);"
> +		"	gl_FragDepth = gl_FragCoord.z;"
> +		"}";

Might want to do some little expression on gl_FragCoord.z here, in case
some day we decide to notice that gl_FragDepth = gl_FragCoord.z is a
no-op.
-------------- 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/20120424/7589472c/attachment.pgp>


More information about the Piglit mailing list