Re: [Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization

2015-03-11 Thread Samuel Iglesias Gonsálvez
On Tue, 2015-03-10 at 18:23 -0700, Matt Turner wrote:
 On Sun, Mar 1, 2015 at 11:31 PM, Samuel Iglesias Gonsalvez
 sigles...@igalia.com wrote:
  Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com
  ---
 
  v2:
  * Implement it as shader_runner test
 
   tests/shaders/glsl-opt-0-cmp-xy.shader_test | 33 
  +
   1 file changed, 33 insertions(+)
   create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.shader_test
 
  diff --git a/tests/shaders/glsl-opt-0-cmp-xy.shader_test 
  b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
  new file mode 100644
  index 000..57c5716
  --- /dev/null
  +++ b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
  @@ -0,0 +1,33 @@
  +/* Test (0 cmp x+y) optimization. */
  +
  +[require]
  +GLSL = 1.10
  +
  +[vertex shader]
 
 You can use [vertex shader passthrough] and drop the vertex shader body.
 
  +
  +void main()
  +{
  +   gl_Position = ftransform();
  +}
  +
  +[fragment shader]
  +
  +uniform float a;
  +
  +void main()
  +{
  +   if (0.0 = (a - 1.0))
  +   gl_FragColor = vec4(0, 1, 0, 1);
  +   else
  +   gl_FragColor = vec4(1, 0, 0, 1);
  +}
  +
  +[test]
  +clear color 0.5 0.5 0.5 0.5
  +clear
 
 You can remove these two lines since the test is painting the whole window.
 
 Reviewed-by: Matt Turner matts...@gmail.com
 
 Thanks!
 

I will do those changes.

Thanks for the review!

Sam



signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization

2015-03-10 Thread Samuel Iglesias Gonsálvez
On Fri, 2015-03-06 at 08:12 +0100, Samuel Iglesias Gonsálvez wrote:
 Hello,
 
 I plan to push these two patches next week, just in case someone wants
 to review them in the coming days.

Tomorrow I will push these two patches.

Sam


signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization

2015-03-10 Thread Matt Turner
On Sun, Mar 1, 2015 at 11:31 PM, Samuel Iglesias Gonsalvez
sigles...@igalia.com wrote:
 Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com
 ---

 v2:
 * Implement it as shader_runner test

  tests/shaders/glsl-opt-0-cmp-xy.shader_test | 33 
 +
  1 file changed, 33 insertions(+)
  create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.shader_test

 diff --git a/tests/shaders/glsl-opt-0-cmp-xy.shader_test 
 b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
 new file mode 100644
 index 000..57c5716
 --- /dev/null
 +++ b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
 @@ -0,0 +1,33 @@
 +/* Test (0 cmp x+y) optimization. */
 +
 +[require]
 +GLSL = 1.10
 +
 +[vertex shader]

You can use [vertex shader passthrough] and drop the vertex shader body.

 +
 +void main()
 +{
 +   gl_Position = ftransform();
 +}
 +
 +[fragment shader]
 +
 +uniform float a;
 +
 +void main()
 +{
 +   if (0.0 = (a - 1.0))
 +   gl_FragColor = vec4(0, 1, 0, 1);
 +   else
 +   gl_FragColor = vec4(1, 0, 0, 1);
 +}
 +
 +[test]
 +clear color 0.5 0.5 0.5 0.5
 +clear

You can remove these two lines since the test is painting the whole window.

Reviewed-by: Matt Turner matts...@gmail.com

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


Re: [Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization

2015-03-05 Thread Samuel Iglesias Gonsálvez
Hello,

I plan to push these two patches next week, just in case someone wants
to review them in the coming days.

Thanks,

Sam

On Mon, 2015-03-02 at 08:31 +0100, Samuel Iglesias Gonsalvez wrote:
 Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com
 ---
 
 v2:
 * Implement it as shader_runner test
 
  tests/shaders/glsl-opt-0-cmp-xy.shader_test | 33 
 +
  1 file changed, 33 insertions(+)
  create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.shader_test
 
 diff --git a/tests/shaders/glsl-opt-0-cmp-xy.shader_test 
 b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
 new file mode 100644
 index 000..57c5716
 --- /dev/null
 +++ b/tests/shaders/glsl-opt-0-cmp-xy.shader_test
 @@ -0,0 +1,33 @@
 +/* Test (0 cmp x+y) optimization. */
 +
 +[require]
 +GLSL = 1.10
 +
 +[vertex shader]
 +
 +void main()
 +{
 + gl_Position = ftransform();
 +}
 +
 +[fragment shader]
 +
 +uniform float a;
 +
 +void main()
 +{
 + if (0.0 = (a - 1.0))
 + gl_FragColor = vec4(0, 1, 0, 1);
 + else
 + gl_FragColor = vec4(1, 0, 0, 1);
 +}
 +
 +[test]
 +clear color 0.5 0.5 0.5 0.5
 +clear
 +uniform float a 0
 +draw rect -1 -1 1 2
 +uniform float a 2
 +draw rect 0 -1 1 2
 +probe rgb 125 0 1.0 0.0 0.0
 +probe rgb 0 0 0.0 1.0 0.0




signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit