[Piglit] [PATCH] Test inlining of notEqual() triggering constant folding.
Paul Berry
stereotype441 at gmail.com
Thu Oct 27 10:48:54 PDT 2011
On 27 October 2011 10:37, Ian Romanick <idr at freedesktop.org> wrote:
> On 10/26/2011 06:38 PM, Paul Berry wrote:
>
>> These tests exercise a bug found in Mesa: if function inlining caused
>> an execution of notEqual() to be constant-folded, an assertion failure
>> would occur.
>>
>
> Is there a bugzilla entry associated with this problem in Mesa? If there
> is, it is worth calling it out in this commit message.
>
No bugzilla entry that I'm aware of. I only stumbled on it because my
implementation of isnan() triggered it.
>
> Otherwise,
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
>
> ---
>> .../execution/fs-inline-**notequal.shader_test | 25
>> +++++++++++++++++++
>> .../execution/vs-inline-**notequal.shader_test | 26
>> ++++++++++++++++++++
>> 2 files changed, 51 insertions(+), 0 deletions(-)
>> create mode 100644 tests/spec/glsl-1.10/**execution/fs-inline-notequal.*
>> *shader_test
>> create mode 100644 tests/spec/glsl-1.10/**execution/vs-inline-notequal.*
>> *shader_test
>>
>> diff --git a/tests/spec/glsl-1.10/**execution/fs-inline-notequal.**shader_test
>> b/tests/spec/glsl-1.10/**execution/fs-inline-notequal.**shader_test
>> new file mode 100644
>> index 0000000..6def318
>> --- /dev/null
>> +++ b/tests/spec/glsl-1.10/**execution/fs-inline-notequal.**shader_test
>> @@ -0,0 +1,25 @@
>> +# This test exercises a bug found in Mesa: if function inlining caused
>> +# an execution of notEqual() to be constant-folded, an assertion
>> +# failure would occur.
>> +
>> +[vertex shader]
>> +void main()
>> +{
>> + gl_Position = gl_Vertex;
>> +}
>> +
>> +[fragment shader]
>> +bvec4 foo(vec4 x, vec4 y)
>> +{
>> + return notEqual(x, y);
>> +}
>> +
>> +void main()
>> +{
>> + gl_FragColor = vec4(foo(vec4(0.0, 0.0, 1.0, 1.0),
>> + vec4(0.0, 1.0, 1.0, 0.0)));
>> +}
>> +
>> +[test]
>> +draw rect -1 -1 2 2
>> +probe all rgba 0.0 1.0 0.0 1.0
>> diff --git a/tests/spec/glsl-1.10/**execution/vs-inline-notequal.**shader_test
>> b/tests/spec/glsl-1.10/**execution/vs-inline-notequal.**shader_test
>> new file mode 100644
>> index 0000000..a2a0923
>> --- /dev/null
>> +++ b/tests/spec/glsl-1.10/**execution/vs-inline-notequal.**shader_test
>> @@ -0,0 +1,26 @@
>> +# This test exercises a bug found in Mesa: if function inlining caused
>> +# an execution of notEqual() to be constant-folded, an assertion
>> +# failure would occur.
>> +
>> +[vertex shader]
>> +bvec4 foo(vec4 x, vec4 y)
>> +{
>> + return notEqual(x, y);
>> +}
>> +
>> +void main()
>> +{
>> + gl_Position = gl_Vertex;
>> + gl_FrontColor = vec4(foo(vec4(0.0, 0.0, 1.0, 1.0),
>> + vec4(0.0, 1.0, 1.0, 0.0)));
>> +}
>> +
>> +[fragment shader]
>> +void main()
>> +{
>> + gl_FragColor = gl_Color;
>> +}
>> +
>> +[test]
>> +draw rect -1 -1 2 2
>> +probe all rgba 0.0 1.0 0.0 1.0
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111027/094c11e6/attachment.htm>
More information about the Piglit
mailing list