Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-11-15 Thread Juliet Fru
Hi Matt,

My project is complete, but I was working on porting some of these tests to
shader_test files. By all means you can port them, I'll take it from where
you end.

Thanks,
Juliet

On Sat, Nov 14, 2015 at 3:46 AM, Matt Turner  wrote:

> On Tue, Oct 20, 2015 at 12:16 AM, Juliet Fru  wrote:
> > Hi Brian,
> >
> > I have been working on the "gl_Position not written check"
> > (tests/spec/glsl-1.10/linker/) test from glean to shader_test files.
> Here is
> > what I have so far.  I'm sure there may be some errors since this test
> does
> > not have the fragment shader aspects. I am not very familiar with
> > shader_test files. I will appreciate if you could correct this sample
> test
> > so I could submit the patch and move on to the others.
>
> Hi Juliet,
>
> I was going to port the fragment/vertex program (tfragprog1.cpp,
> tvertprog1.cpp) tests in glean to regular shader_test files, but I
> don't want to collide with anything you're doing. I haven't seen
> anything from you in more than three weeks, so I think your project
> might be complete? Can you confirm your status?
>
> Thanks,
> Matt
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-11-13 Thread Matt Turner
On Tue, Oct 20, 2015 at 12:16 AM, Juliet Fru  wrote:
> Hi Brian,
>
> I have been working on the "gl_Position not written check"
> (tests/spec/glsl-1.10/linker/) test from glean to shader_test files. Here is
> what I have so far.  I'm sure there may be some errors since this test does
> not have the fragment shader aspects. I am not very familiar with
> shader_test files. I will appreciate if you could correct this sample test
> so I could submit the patch and move on to the others.

Hi Juliet,

I was going to port the fragment/vertex program (tfragprog1.cpp,
tvertprog1.cpp) tests in glean to regular shader_test files, but I
don't want to collide with anything you're doing. I haven't seen
anything from you in more than three weeks, so I think your project
might be complete? Can you confirm your status?

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


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-20 Thread Juliet Fru
Hi Brian,

I have been working on the "gl_Position not written check"
(tests/spec/glsl-1.10/linker/) test from glean to shader_test files. Here
 is what I have so far.  I'm sure there may be
some errors since this test does not have the fragment shader aspects. I am
not very familiar with shader_test files. I will appreciate if you could
correct this sample test so I could submit the patch and move on to the
others.

Thanks,
Juliet

On Wed, Oct 14, 2015 at 9:18 PM, Juliet Fru  wrote:

> Thanks, I will look at them As soon as possible.
>
> On Wed, Oct 14, 2015 at 6:09 PM, Brian Paul  wrote:
>
>> On 10/14/2015 02:33 AM, Juliet Fru wrote:
>>
>>> Hello Brian,
>>>
>>> Please post a plan for what you're doing before you do all the work
>>> to make sure you don't do anything unnecessary.
>>>
>>> Like I said before, most of the glsl1 tests should already be
>>> covered by existing shader runner tests.  There's probably not too
>>> many that need to be ported.
>>>
>>>
>>>  I don't like this at all. These tests should become
>>> shader_test files
>>>  -- not just a straight port from glean to the piglit
>>> framework.
>>>
>>>
>>> I have been looking at the shader_test files and the shader_lang tests I
>>> see they're covered in the shader directory. I don't know if porting
>>> this test is necessary if not I'll like to know which tests should be
>>> moved as the shader_test files.
>>>
>>
>> I think just a hand-full of tests could be ported to shader_runner tests.
>>
>> "current name" and (place to put new test):
>>
>> "gl_Position not written check"  (tests/spec/glsl-1.10/linker/)
>>
>> "varying var mismatch"(tests/spec/glsl-1.10/linker/)
>>
>> "varying read but not written"  (tests/spec/glsl-1.10/linker/)
>>
>> "illegal assignment"   (tests/spec/glsl-1.10/compiler/)
>>
>> "continue with no loop"   (tests/spec/glsl-1.10/compiler/)
>>
>> "break with no loop"  (tests/spec/glsl-1.10/compiler/)
>>
>> "if (boolean-scalar) check"  (tests/spec/glsl-1.10/compiler/)
>>
>>
>> There _may_ be shader runner tests already for some of these, but I
>> didn't find them with a quick search.
>>
>> -Brian
>>
>>
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-20 Thread Brian Paul
For that particular test, we want to check that glLinkProgram() fails if 
the vertex shader(s) do not write anything to gl_Position.


In tests/all.py, look for 'glsl-link-test'.  For example:

g(['glsl-link-test',
   os.path.join('shaders', 'glsl-link-initializer-06a.vert'),
   os.path.join('shaders', 'glsl-link-initializer-06b.vert'),
   'fail'],
  'GLSL link mismatched global initializer expression')

That's an example of a test that checks for linker failure.

So, you basically have to write a "no_gl_Position_written.vert" file 
something like:


void main()
{
   // no gl_Position writen
   gl_Color = vec4(1,0,0,0);
}

Then, add a new glsl-link-test entry to tests/all.py something like:

g(['glsl-link-test',
   os.path.join('shaders', 'no_gl_Position_written.vert'),
   'fail'],
   'GLSL no gl_Position written')

-Brian



On 10/20/2015 01:16 AM, Juliet Fru wrote:

Hi Brian,

I have been working on the "gl_Position not written check"
(tests/spec/glsl-1.10/linker/) test from glean to shader_test files.Here

is what I have so far.  I'm sure there may be some errors since this
test does not have the fragment shader aspects. I am not very familiar
with shader_test files. I will appreciate if you could correct this
sample test so I could submit the patch and move on to the others.

Thanks,
Juliet

On Wed, Oct 14, 2015 at 9:18 PM, Juliet Fru > wrote:

Thanks, I will look at them As soon as possible.

On Wed, Oct 14, 2015 at 6:09 PM, Brian Paul > wrote:

On 10/14/2015 02:33 AM, Juliet Fru wrote:

Hello Brian,

 Please post a plan for what you're doing before you do
all the work
 to make sure you don't do anything unnecessary.

 Like I said before, most of the glsl1 tests should
already be
 covered by existing shader runner tests.  There's
probably not too
 many that need to be ported.


  I don't like this at all. These tests should
become
 shader_test files
  -- not just a straight port from glean to the
piglit framework.


I have been looking at the shader_test files and the
shader_lang tests I
see they're covered in the shader directory. I don't know if
porting
this test is necessary if not I'll like to know which tests
should be
moved as the shader_test files.


I think just a hand-full of tests could be ported to
shader_runner tests.

"current name" and (place to put new test):

"gl_Position not written check"  (tests/spec/glsl-1.10/linker/)

"varying var mismatch"(tests/spec/glsl-1.10/linker/)

"varying read but not written"  (tests/spec/glsl-1.10/linker/)

"illegal assignment"   (tests/spec/glsl-1.10/compiler/)

"continue with no loop"   (tests/spec/glsl-1.10/compiler/)

"break with no loop"  (tests/spec/glsl-1.10/compiler/)

"if (boolean-scalar) check"  (tests/spec/glsl-1.10/compiler/)


There _may_ be shader runner tests already for some of these,
but I didn't find them with a quick search.

-Brian





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


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-14 Thread Brian Paul

On 10/14/2015 02:33 AM, Juliet Fru wrote:

Hello Brian,

Please post a plan for what you're doing before you do all the work
to make sure you don't do anything unnecessary.

Like I said before, most of the glsl1 tests should already be
covered by existing shader runner tests.  There's probably not too
many that need to be ported.


 I don't like this at all. These tests should become
shader_test files
 -- not just a straight port from glean to the piglit framework.


I have been looking at the shader_test files and the shader_lang tests I
see they're covered in the shader directory. I don't know if porting
this test is necessary if not I'll like to know which tests should be
moved as the shader_test files.


I think just a hand-full of tests could be ported to shader_runner tests.

"current name" and (place to put new test):

"gl_Position not written check"  (tests/spec/glsl-1.10/linker/)

"varying var mismatch"(tests/spec/glsl-1.10/linker/)

"varying read but not written"  (tests/spec/glsl-1.10/linker/)

"illegal assignment"   (tests/spec/glsl-1.10/compiler/)

"continue with no loop"   (tests/spec/glsl-1.10/compiler/)

"break with no loop"  (tests/spec/glsl-1.10/compiler/)

"if (boolean-scalar) check"  (tests/spec/glsl-1.10/compiler/)


There _may_ be shader runner tests already for some of these, but I 
didn't find them with a quick search.


-Brian

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


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-14 Thread Juliet Fru
Hello Brian,

Please post a plan for what you're doing before you do all the work to make
> sure you don't do anything unnecessary.
>
> Like I said before, most of the glsl1 tests should already be covered by
> existing shader runner tests.  There's probably not too many that need to
> be ported.
>
>
>> I don't like this at all. These tests should become shader_test files
>> -- not just a straight port from glean to the piglit framework.
>>
>
I have been looking at the shader_test files and the shader_lang tests I
see they're covered in the shader directory. I don't know if porting this
test is necessary if not I'll like to know which tests should be moved as
the shader_test files.

Thanks for the assistance,
Juliet
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-14 Thread Juliet Fru
Thanks, I will look at them As soon as possible.

On Wed, Oct 14, 2015 at 6:09 PM, Brian Paul  wrote:

> On 10/14/2015 02:33 AM, Juliet Fru wrote:
>
>> Hello Brian,
>>
>> Please post a plan for what you're doing before you do all the work
>> to make sure you don't do anything unnecessary.
>>
>> Like I said before, most of the glsl1 tests should already be
>> covered by existing shader runner tests.  There's probably not too
>> many that need to be ported.
>>
>>
>>  I don't like this at all. These tests should become
>> shader_test files
>>  -- not just a straight port from glean to the piglit
>> framework.
>>
>>
>> I have been looking at the shader_test files and the shader_lang tests I
>> see they're covered in the shader directory. I don't know if porting
>> this test is necessary if not I'll like to know which tests should be
>> moved as the shader_test files.
>>
>
> I think just a hand-full of tests could be ported to shader_runner tests.
>
> "current name" and (place to put new test):
>
> "gl_Position not written check"  (tests/spec/glsl-1.10/linker/)
>
> "varying var mismatch"(tests/spec/glsl-1.10/linker/)
>
> "varying read but not written"  (tests/spec/glsl-1.10/linker/)
>
> "illegal assignment"   (tests/spec/glsl-1.10/compiler/)
>
> "continue with no loop"   (tests/spec/glsl-1.10/compiler/)
>
> "break with no loop"  (tests/spec/glsl-1.10/compiler/)
>
> "if (boolean-scalar) check"  (tests/spec/glsl-1.10/compiler/)
>
>
> There _may_ be shader runner tests already for some of these, but I didn't
> find them with a quick search.
>
> -Brian
>
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-12 Thread Brian Paul
Please post a plan for what you're doing before you do all the work to 
make sure you don't do anything unnecessary.


Like I said before, most of the glsl1 tests should already be covered by 
existing shader runner tests.  There's probably not too many that need 
to be ported.


-Brian

On 10/10/2015 12:43 PM, Juliet Fru wrote:

Hi,

Alright, I  will make these changes and send in the patch.

Thanks,
Juliet

On Thu, Oct 8, 2015 at 3:31 AM, Matt Turner > wrote:

On Wed, Oct 7, 2015 at 1:48 AM, Juliet Fru > wrote:
> This test replaces the original tglsl1.cpp test
> ---
>  tests/all.py|1 +
>  tests/spec/gl-1.0/CMakeLists.gl.txt |1 +
>  tests/spec/gl-1.0/shading-lang.c| 1939 
+++
>  3 files changed, 1941 insertions(+)
>  create mode 100644 tests/spec/gl-1.0/shading-lang.c

I don't like this at all. These tests should become shader_test files
-- not just a straight port from glean to the piglit framework.




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



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


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-10 Thread Juliet Fru
Hi,

Alright, I  will make these changes and send in the patch.

Thanks,
Juliet

On Thu, Oct 8, 2015 at 3:31 AM, Matt Turner  wrote:

> On Wed, Oct 7, 2015 at 1:48 AM, Juliet Fru  wrote:
> > This test replaces the original tglsl1.cpp test
> > ---
> >  tests/all.py|1 +
> >  tests/spec/gl-1.0/CMakeLists.gl.txt |1 +
> >  tests/spec/gl-1.0/shading-lang.c| 1939
> +++
> >  3 files changed, 1941 insertions(+)
> >  create mode 100644 tests/spec/gl-1.0/shading-lang.c
>
> I don't like this at all. These tests should become shader_test files
> -- not just a straight port from glean to the piglit framework.
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-07 Thread Brian Paul

Hi Juliet,

I only have time for a quick review for now.  See comments below.  I'll 
try to look closer tomorrow.



On 10/07/2015 02:48 AM, Juliet Fru wrote:

This test replaces the original tglsl1.cpp test
---
  tests/all.py|1 +
  tests/spec/gl-1.0/CMakeLists.gl.txt |1 +
  tests/spec/gl-1.0/shading-lang.c| 1939 +++
  3 files changed, 1941 insertions(+)
  create mode 100644 tests/spec/gl-1.0/shading-lang.c

diff --git a/tests/all.py b/tests/all.py
index fe088f5..6140320 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -999,6 +999,7 @@ with profile.group_manager(
  g(['gl-1.0-fpexceptions'])
  g(['gl-1.0-ortho-pos'])
  g(['gl-1.0-readpixsanity'])
+g(['gl-1.0-shading-lang'])
  g(['gl-1.0-logicop'])

  with profile.group_manager(
diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt 
b/tests/spec/gl-1.0/CMakeLists.gl.txt
index d04b835..28a1d42 100644
--- a/tests/spec/gl-1.0/CMakeLists.gl.txt
+++ b/tests/spec/gl-1.0/CMakeLists.gl.txt


The test should go in tests/spec/gl-2.0/ instead.  There was no GLSL 
support in GL 1.0




@@ -26,6 +26,7 @@ piglit_add_executable (gl-1.0-polygon-line-aa 
polygon-line-aa.c)
  piglit_add_executable (gl-1.0-push-no-attribs push-no-attribs.c)
  piglit_add_executable (gl-1.0-readpixsanity readpix.c)
  piglit_add_executable (gl-1.0-rendermode-feedback rendermode-feedback.c)
+piglit_add_executable (gl-1.0-shading-lang shading-lang.c)
  piglit_add_executable (gl-1.0-swapbuffers-behavior swapbuffers-behavior.c)

  # vim: ft=cmake:
diff --git a/tests/spec/gl-1.0/shading-lang.c b/tests/spec/gl-1.0/shading-lang.c
new file mode 100644
index 000..5b8ed9a
--- /dev/null
+++ b/tests/spec/gl-1.0/shading-lang.c
@@ -0,0 +1,1939 @@
+/*
+ * BEGIN_COPYRIGHT -*- glean -*-
+ *
+ * Copyright (C) 1999  Allen Akin   All Rights Reserved.
+ * Copyright (C) 2008  VMware, Inc.  All Rights Reserved.
+ *
+ * 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 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 ALLEN AKIN 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.
+ *
+ * END_COPYRIGHT
+ */
+
+/** @file shading-lang.c
+ *
+ * Test OpenGL shading language
+ *
+ * Authors:
+ * Brian Paul 
+ * Adapted to Piglit by Juliet Fru , October 
2015.
+ */
+
+#include "piglit-util-gl.h"
+
+#include 
+#include 
+#include 
+#include 
+
+
+PIGLIT_GL_TEST_CONFIG_BEGIN config.supports_gl_compat_version = 20;
+
+config.window_visual =
+   PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH |
+   PIGLIT_GL_VISUAL_STENCIL;
+
+PIGLIT_GL_TEST_CONFIG_END
+#define GL_GLEXT_PROTOTYPES
+#define FLAG_NONE 0x0
+#define FLAG_LOOSE0x1  /* to indicate a looser tolerance test 
is needed */
+#define FLAG_ILLEGAL_SHADER   0x2  /* the shader test should not compile */
+#define FLAG_ILLEGAL_LINK 0x4  /* the shaders should not link */
+#define FLAG_VERSION_1_20 0x8  /* GLSL 1.20 test */
+#define FLAG_VERSION_1_30 0x10 /* GLSL 1.30 test */
+#define FLAG_WINDING_CW   0x20 /* clockwise-winding polygon */
+#define FLAG_VERTEX_TEXTURE   0x40
+#define FLAG_ARB_DRAW_BUFFERS 0x80
+#define DONT_CARE_Z -1.0
+#define NO_VERTEX_SHADER NULL
+#define NO_FRAGMENT_SHADER NULL
+#define PRIMARY_R 0.25
+#define PRIMARY_G 0.75
+#define PRIMARY_B 0.5
+#define PRIMARY_A 0.25
+#define SECONDARY_R 0.0
+#define SECONDARY_G 0.25
+#define SECONDARY_B 0.25
+#define SECONDARY_A 1.0
+#define AMBIENT { 0.2, 0.4, 0.6, 0.8 }
+#define LIGHT_DIFFUSE { 0.1, 0.3, 0.5, 0.7 }
+#define MAT_DIFFUSE { 0.1, 0.3, 0.5, 0.7 }
+#define DIFFUSE_PRODUCT { 0.01, 0.09, 0.25, 0.7 }  /* note alpha! */
+#define UNIFORM1 {1.0, 0.25, 0.75, 0.0 }   /* don't change! */
+#define PSIZE 3.0
+#define PSIZE_MIN 2.0
+#define PSIZE_MAX 8.0
+#define PSIZE_THRESH 1.5
+#define PSIZE_ATTEN0 4.0
+#define PSIZE_ATTEN1 5.0
+#define PSIZE_ATTEN2 6.0
+#define FOG_START 100.0
+#define FOG_END   200.0
+#define FOG_R 1.0
+#define FOG_G 0.5
+#define FOG_B 1.0
+#define FOG_A 0.0
+static 

[Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-07 Thread Juliet Fru
This test replaces the original tglsl1.cpp test
---
 tests/all.py|1 +
 tests/spec/gl-1.0/CMakeLists.gl.txt |1 +
 tests/spec/gl-1.0/shading-lang.c| 1939 +++
 3 files changed, 1941 insertions(+)
 create mode 100644 tests/spec/gl-1.0/shading-lang.c

diff --git a/tests/all.py b/tests/all.py
index fe088f5..6140320 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -999,6 +999,7 @@ with profile.group_manager(
 g(['gl-1.0-fpexceptions'])
 g(['gl-1.0-ortho-pos'])
 g(['gl-1.0-readpixsanity'])
+g(['gl-1.0-shading-lang'])
 g(['gl-1.0-logicop'])
 
 with profile.group_manager(
diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt 
b/tests/spec/gl-1.0/CMakeLists.gl.txt
index d04b835..28a1d42 100644
--- a/tests/spec/gl-1.0/CMakeLists.gl.txt
+++ b/tests/spec/gl-1.0/CMakeLists.gl.txt
@@ -26,6 +26,7 @@ piglit_add_executable (gl-1.0-polygon-line-aa 
polygon-line-aa.c)
 piglit_add_executable (gl-1.0-push-no-attribs push-no-attribs.c)
 piglit_add_executable (gl-1.0-readpixsanity readpix.c)
 piglit_add_executable (gl-1.0-rendermode-feedback rendermode-feedback.c)
+piglit_add_executable (gl-1.0-shading-lang shading-lang.c)
 piglit_add_executable (gl-1.0-swapbuffers-behavior swapbuffers-behavior.c)
 
 # vim: ft=cmake:
diff --git a/tests/spec/gl-1.0/shading-lang.c b/tests/spec/gl-1.0/shading-lang.c
new file mode 100644
index 000..5b8ed9a
--- /dev/null
+++ b/tests/spec/gl-1.0/shading-lang.c
@@ -0,0 +1,1939 @@
+/*
+ * BEGIN_COPYRIGHT -*- glean -*-
+ * 
+ * Copyright (C) 1999  Allen Akin   All Rights Reserved.
+ * Copyright (C) 2008  VMware, Inc.  All Rights Reserved.
+ * 
+ * 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 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 ALLEN AKIN 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.
+ * 
+ * END_COPYRIGHT
+ */
+
+/** @file shading-lang.c
+ *
+ * Test OpenGL shading language
+ *
+ * Authors:
+ * Brian Paul 
+ * Adapted to Piglit by Juliet Fru , October 
2015.
+ */
+
+#include "piglit-util-gl.h"
+
+#include 
+#include 
+#include 
+#include 
+
+
+PIGLIT_GL_TEST_CONFIG_BEGIN config.supports_gl_compat_version = 20;
+
+config.window_visual =
+   PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH |
+   PIGLIT_GL_VISUAL_STENCIL;
+
+PIGLIT_GL_TEST_CONFIG_END
+#define GL_GLEXT_PROTOTYPES
+#define FLAG_NONE 0x0
+#define FLAG_LOOSE0x1  /* to indicate a looser tolerance test 
is needed */
+#define FLAG_ILLEGAL_SHADER   0x2  /* the shader test should not compile */
+#define FLAG_ILLEGAL_LINK 0x4  /* the shaders should not link */
+#define FLAG_VERSION_1_20 0x8  /* GLSL 1.20 test */
+#define FLAG_VERSION_1_30 0x10 /* GLSL 1.30 test */
+#define FLAG_WINDING_CW   0x20 /* clockwise-winding polygon */
+#define FLAG_VERTEX_TEXTURE   0x40
+#define FLAG_ARB_DRAW_BUFFERS 0x80
+#define DONT_CARE_Z -1.0
+#define NO_VERTEX_SHADER NULL
+#define NO_FRAGMENT_SHADER NULL
+#define PRIMARY_R 0.25
+#define PRIMARY_G 0.75
+#define PRIMARY_B 0.5
+#define PRIMARY_A 0.25
+#define SECONDARY_R 0.0
+#define SECONDARY_G 0.25
+#define SECONDARY_B 0.25
+#define SECONDARY_A 1.0
+#define AMBIENT { 0.2, 0.4, 0.6, 0.8 }
+#define LIGHT_DIFFUSE { 0.1, 0.3, 0.5, 0.7 }
+#define MAT_DIFFUSE { 0.1, 0.3, 0.5, 0.7 }
+#define DIFFUSE_PRODUCT { 0.01, 0.09, 0.25, 0.7 }  /* note alpha! */
+#define UNIFORM1 {1.0, 0.25, 0.75, 0.0 }   /* don't change! */
+#define PSIZE 3.0
+#define PSIZE_MIN 2.0
+#define PSIZE_MAX 8.0
+#define PSIZE_THRESH 1.5
+#define PSIZE_ATTEN0 4.0
+#define PSIZE_ATTEN1 5.0
+#define PSIZE_ATTEN2 6.0
+#define FOG_START 100.0
+#define FOG_END   200.0
+#define FOG_R 1.0
+#define FOG_G 0.5
+#define FOG_B 1.0
+#define FOG_A 0.0
+static const GLfloat PrimaryColor[4] = { PRIMARY_R, PRIMARY_G,
+   PRIMARY_B, PRIMARY_A
+};
+
+static const GLfloat SecondaryColor[4] = { SECONDARY_R, SECONDARY_G,
+   SECONDARY_B, SECONDARY_A
+};
+
+static const GLfloat Ambient[4] = AMBIENT;
+static const GLfloat 

Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.

2015-10-07 Thread Matt Turner
On Wed, Oct 7, 2015 at 1:48 AM, Juliet Fru  wrote:
> This test replaces the original tglsl1.cpp test
> ---
>  tests/all.py|1 +
>  tests/spec/gl-1.0/CMakeLists.gl.txt |1 +
>  tests/spec/gl-1.0/shading-lang.c| 1939 
> +++
>  3 files changed, 1941 insertions(+)
>  create mode 100644 tests/spec/gl-1.0/shading-lang.c

I don't like this at all. These tests should become shader_test files
-- not just a straight port from glean to the piglit framework.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit