Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-09-01 Thread Ilia Mirkin
On Tue, Sep 1, 2015 at 2:33 PM, Ian Romanick  wrote:
> On 08/31/2015 09:34 PM, Ilia Mirkin wrote:
>> On Mon, Aug 31, 2015 at 11:55 PM, Ian Romanick  wrote:
>>> +static const char vs_source[] =
>>> +   "#version 330\n"
>>
>> The test description above only requires version 150. AFAIK there's no
>> need for anything higher...
>
> Yes... that was a copy-and-paste mistake.  I'll fix that.

With both instances of that fixed up, this is Reviewed-by: Ilia Mirkin

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


Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-09-01 Thread Ian Romanick
On 08/31/2015 09:34 PM, Ilia Mirkin wrote:
> On Mon, Aug 31, 2015 at 11:55 PM, Ian Romanick  wrote:
>> +static const char vs_source[] =
>> +   "#version 330\n"
> 
> The test description above only requires version 150. AFAIK there's no
> need for anything higher...

Yes... that was a copy-and-paste mistake.  I'll fix that.

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


Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-09-01 Thread Ian Romanick
On 08/31/2015 11:41 PM, Matt Turner wrote:
> On Mon, Aug 31, 2015 at 8:55 PM, Ian Romanick  wrote:
>> From: Ian Romanick 
>>
>> Also verify that setting a float with glUniform*dv generates an error.
>>
>> NOTE: Mesa currently fails the matrix tests.
>>
>> Signed-off-by: Ian Romanick 
>> Cc: Dave Airlie 
>> ---
> 
> Typo in subject: abr -> arb

Yeah I noticed that as soon as I looked in my e-mail for reviews.  D'oh!

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


Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-09-01 Thread Matt Turner
On Mon, Aug 31, 2015 at 8:55 PM, Ian Romanick  wrote:
> From: Ian Romanick 
>
> Also verify that setting a float with glUniform*dv generates an error.
>
> NOTE: Mesa currently fails the matrix tests.
>
> Signed-off-by: Ian Romanick 
> Cc: Dave Airlie 
> ---

Typo in subject: abr -> arb
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-08-31 Thread Ian Romanick
From: Ian Romanick 

Also verify that setting a float with glUniform*dv generates an error.

NOTE: Mesa currently fails the matrix tests.

Signed-off-by: Ian Romanick 
Cc: Dave Airlie 
---
I will have a patch out on the mesa-dev list that _should_ fix this.
I can't fully run it on my driver. :(  The bug was discovered while
inspecting the code to make other, unrelated changes.

 tests/all.py   |   1 +
 .../execution/CMakeLists.gl.txt|   1 +
 .../execution/wrong-type-setter.c  | 198 +
 3 files changed, 200 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c

diff --git a/tests/all.py b/tests/all.py
index fcfc5cd..b21a5df 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2105,6 +2105,7 @@ with profile.group_manager(
  g(['arb_gpu_shader_fp64-tf-interleaved'])
  g(['arb_gpu_shader_fp64-tf-interleaved-aligned'])
  g(['arb_gpu_shader_fp64-getuniformdv'])
+ g(['arb_gpu_shader_fp64-wrong-type-setter'])
 
 with profile.group_manager(
 PiglitGLTest,
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt 
b/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
index 6738363..650b312 100644
--- a/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
+++ b/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
@@ -15,3 +15,4 @@ piglit_add_executable (arb_gpu_shader_fp64-tf-interleaved 
tf-interleaved.c)
 piglit_add_executable (arb_gpu_shader_fp64-tf-interleaved-aligned 
tf-interleaved-aligned.c)
 piglit_add_executable (arb_gpu_shader_fp64-double-gettransformfeedbackvarying 
double-gettransformfeedbackvarying.c)
 piglit_add_executable (arb_gpu_shader_fp64-getuniformdv getuniformdv.c)
+piglit_add_executable (arb_gpu_shader_fp64-wrong-type-setter 
wrong-type-setter.c)
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c 
b/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c
new file mode 100644
index 000..7940ef2
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c
@@ -0,0 +1,198 @@
+/*
+ * Copyright © 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \name wronge-type-setter.c
+ * Try setting a double uniform with a float setter, expect an error.
+ *
+ * Also try the vice-versa combinations.
+ */
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_core_version = 32;
+   config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const char vs_source[] =
+   "#version 330\n"
+   "#extension GL_ARB_gpu_shader_fp64: require\n"
+   "\n"
+   "uniform float   f1;\n"
+   "uniform vec2f2;\n"
+   "uniform vec3f3;\n"
+   "uniform vec4f4;\n"
+   "\n"
+   "uniform mat2fm22;\n"
+   "uniform mat2x3  fm23;\n"
+   "uniform mat2x4  fm24;\n"
+   "uniform mat3x2  fm32;\n"
+   "uniform mat3fm33;\n"
+   "uniform mat3x4  fm34;\n"
+   "uniform mat4x2  fm42;\n"
+   "uniform mat4x3  fm43;\n"
+   "uniform mat4fm44;\n"
+   "\n"
+   "flat out vec4 outf;\n"
+   "\n"
+   "uniform double  d1;\n"
+   "uniform dvec2   d2;\n"
+   "uniform dvec3   d3;\n"
+   "uniform dvec4   d4;\n"
+   "\n"
+   "uniform dmat2   dm22;\n"
+   "uniform dmat2x3 dm23;\n"
+   "uniform dmat2x4 dm24;\n"
+   "uniform dmat3x2 dm32;\n"
+   "uniform dmat3   dm33;\n"
+   "uniform dmat3x4 dm34;\n"
+   "uniform dmat4x2 dm42;\n"
+   "uniform dmat4x3 dm43;\n"
+   "uniform dmat4   dm44;\n"
+   "\n"
+   "flat out dvec4 outd;\n"
+   "\n"
+   "void main()\n"
+   "{\n"
+   "   outf = vec4(f1) +\n"
+   "   

Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error

2015-08-31 Thread Ilia Mirkin
On Mon, Aug 31, 2015 at 11:55 PM, Ian Romanick  wrote:
> From: Ian Romanick 
>
> Also verify that setting a float with glUniform*dv generates an error.
>
> NOTE: Mesa currently fails the matrix tests.
>
> Signed-off-by: Ian Romanick 
> Cc: Dave Airlie 
> ---
> I will have a patch out on the mesa-dev list that _should_ fix this.
> I can't fully run it on my driver. :(  The bug was discovered while
> inspecting the code to make other, unrelated changes.
>
>  tests/all.py   |   1 +
>  .../execution/CMakeLists.gl.txt|   1 +
>  .../execution/wrong-type-setter.c  | 198 
> +
>  3 files changed, 200 insertions(+)
>  create mode 100644 
> tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c
>
> diff --git a/tests/all.py b/tests/all.py
> index fcfc5cd..b21a5df 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -2105,6 +2105,7 @@ with profile.group_manager(
>   g(['arb_gpu_shader_fp64-tf-interleaved'])
>   g(['arb_gpu_shader_fp64-tf-interleaved-aligned'])
>   g(['arb_gpu_shader_fp64-getuniformdv'])
> + g(['arb_gpu_shader_fp64-wrong-type-setter'])
>
>  with profile.group_manager(
>  PiglitGLTest,
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt 
> b/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
> index 6738363..650b312 100644
> --- a/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/CMakeLists.gl.txt
> @@ -15,3 +15,4 @@ piglit_add_executable (arb_gpu_shader_fp64-tf-interleaved 
> tf-interleaved.c)
>  piglit_add_executable (arb_gpu_shader_fp64-tf-interleaved-aligned 
> tf-interleaved-aligned.c)
>  piglit_add_executable 
> (arb_gpu_shader_fp64-double-gettransformfeedbackvarying 
> double-gettransformfeedbackvarying.c)
>  piglit_add_executable (arb_gpu_shader_fp64-getuniformdv getuniformdv.c)
> +piglit_add_executable (arb_gpu_shader_fp64-wrong-type-setter 
> wrong-type-setter.c)
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c 
> b/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c
> new file mode 100644
> index 000..7940ef2
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/wrong-type-setter.c
> @@ -0,0 +1,198 @@
> +/*
> + * Copyright © 2015 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
> DEALINGS
> + * IN THE SOFTWARE.
> + */
> +
> +/**
> + * \name wronge-type-setter.c
> + * Try setting a double uniform with a float setter, expect an error.
> + *
> + * Also try the vice-versa combinations.
> + */
> +#include "piglit-util-gl.h"
> +
> +PIGLIT_GL_TEST_CONFIG_BEGIN
> +
> +   config.supports_gl_core_version = 32;
> +   config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
> +
> +PIGLIT_GL_TEST_CONFIG_END
> +
> +static const char vs_source[] =
> +   "#version 330\n"

The test description above only requires version 150. AFAIK there's no
need for anything higher...

> +   "#extension GL_ARB_gpu_shader_fp64: require\n"
> +   "\n"
> +   "uniform float   f1;\n"
> +   "uniform vec2f2;\n"
> +   "uniform vec3f3;\n"
> +   "uniform vec4f4;\n"
> +   "\n"
> +   "uniform mat2fm22;\n"
> +   "uniform mat2x3  fm23;\n"
> +   "uniform mat2x4  fm24;\n"
> +   "uniform mat3x2  fm32;\n"
> +   "uniform mat3fm33;\n"
> +   "uniform mat3x4  fm34;\n"
> +   "uniform mat4x2  fm42;\n"
> +   "uniform mat4x3  fm43;\n"
> +   "uniform mat4fm44;\n"
> +   "\n"
> +   "flat out vec4 outf;\n"
> +   "\n"
> +   "uniform double  d1;\n"
> +   "uniform dvec2   d2;\n"
> +   "uniform dvec3   d3;\n"
> +   "uniform dvec4   d4;\n"
> +   "\n"
> +   "uniform dmat2