arb_gpu_shader_fp64: add basic uniform fs test with constant initializer

Submitted by Abdiel Janulgue on Sept. 1, 2014, 12:13 p.m.

Details

Message ID 1409573616-18143-1-git-send-email-abdiel.janulgue@linux.intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Abdiel Janulgue Sept. 1, 2014, 12:13 p.m.
Passes on Nvidia hardware but crashes on Intel

Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 .../execution/fs-uniform.shader_test               |   26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
new file mode 100644
index 0000000..daeda37
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
@@ -0,0 +1,26 @@ 
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader_fp64 : enable
+
+uniform double arg1;
+uniform double arg2;
+uniform double arg3;
+void main()
+{
+	double res = 3.0lf;
+	if ((arg1 * arg2) == res)
+	   gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);
+	else
+	   gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+[test]
+uniform double arg1 1.5
+uniform double arg2 2.0
+draw rect -1 -1 2 2
+probe rgb 1 1 0.0 1.0 0.0

Comments

On Mon, Sep 1, 2014 at 5:13 AM, Abdiel Janulgue
<abdiel.janulgue@linux.intel.com> wrote:
> Passes on Nvidia hardware but crashes on Intel
>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  .../execution/fs-uniform.shader_test               |   26 ++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
> new file mode 100644
> index 0000000..daeda37
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
> @@ -0,0 +1,26 @@
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#extension GL_ARB_gpu_shader_fp64 : enable
> +
> +uniform double arg1;
> +uniform double arg2;
> +uniform double arg3;
> +void main()
> +{
> +       double res = 3.0lf;

From looking at the patch it's unclear whether you're testing uniforms
or initializers, but the subject I would have thought we were testing
'uniform initializers' and from the filename I would have thought we
were testing uniforms.

Which is it?
On 02.09.2014 01:17, Matt Turner wrote:
> On Mon, Sep 1, 2014 at 5:13 AM, Abdiel Janulgue
> <abdiel.janulgue@linux.intel.com> wrote:
>> Passes on Nvidia hardware but crashes on Intel
>>
>> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
>> ---
>>   .../execution/fs-uniform.shader_test               |   26 ++++++++++++++++++++
>>   1 file changed, 26 insertions(+)
>>   create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>>
>> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>> new file mode 100644
>> index 0000000..daeda37
>> --- /dev/null
>> +++ b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>> @@ -0,0 +1,26 @@
>> +[require]
>> +GLSL >= 1.50
>> +GL_ARB_gpu_shader_fp64
>> +
>> +[vertex shader passthrough]
>> +
>> +[fragment shader]
>> +#extension GL_ARB_gpu_shader_fp64 : enable
>> +
>> +uniform double arg1;
>> +uniform double arg2;
>> +uniform double arg3;
>> +void main()
>> +{
>> +       double res = 3.0lf;
>
>  From looking at the patch it's unclear whether you're testing uniforms
> or initializers, but the subject I would have thought we were testing
> 'uniform initializers' and from the filename I would have thought we
> were testing uniforms.
>
> Which is it?
>

Sorry for the confusion. The test accounts for both conditions. On the 
current Intel driver with the initial fp64 feature turned on, a crash is 
triggered when a uniform value is compared with a constant. Anyway 
Tapani was able to fix this issue yesterday with some changes on top of 
my initial patch. I'm not actually sure if this test is necessary anymore.
On 09/02/2014 02:38 PM, Abdiel Janulgue wrote:
> On 02.09.2014 01:17, Matt Turner wrote:
>> On Mon, Sep 1, 2014 at 5:13 AM, Abdiel Janulgue
>> <abdiel.janulgue@linux.intel.com> wrote:
>>> Passes on Nvidia hardware but crashes on Intel
>>>
>>> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
>>> ---
>>>   .../execution/fs-uniform.shader_test               |   26 
>>> ++++++++++++++++++++
>>>   1 file changed, 26 insertions(+)
>>>   create mode 100644 
>>> tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>>>
>>> diff --git 
>>> a/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test 
>>> b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>>> new file mode 100644
>>> index 0000000..daeda37
>>> --- /dev/null
>>> +++ b/tests/spec/arb_gpu_shader_fp64/execution/fs-uniform.shader_test
>>> @@ -0,0 +1,26 @@
>>> +[require]
>>> +GLSL >= 1.50
>>> +GL_ARB_gpu_shader_fp64
>>> +
>>> +[vertex shader passthrough]
>>> +
>>> +[fragment shader]
>>> +#extension GL_ARB_gpu_shader_fp64 : enable
>>> +
>>> +uniform double arg1;
>>> +uniform double arg2;
>>> +uniform double arg3;
>>> +void main()
>>> +{
>>> +       double res = 3.0lf;
>>
>>  From looking at the patch it's unclear whether you're testing uniforms
>> or initializers, but the subject I would have thought we were testing
>> 'uniform initializers' and from the filename I would have thought we
>> were testing uniforms.
>>
>> Which is it?
>>
>
> Sorry for the confusion. The test accounts for both conditions. On the 
> current Intel driver with the initial fp64 feature turned on, a crash 
> is triggered when a uniform value is compared with a constant. Anyway 
> Tapani was able to fix this issue yesterday with some changes on top 
> of my initial patch. I'm not actually sure if this test is necessary 
> anymore.
>

This test is useful as it managed to trigger bad behavior, perhaps 
should be entitled to be a errr 'uniform test'. I've got a bunch of 
uniform initializer tests upcoming which should test only the 
initializer part.


> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit