[Piglit] [PATCH 1/1] cl: Use required format for sampler test

2017-07-17 Thread Jan Vesely
CL_RGBA + CL_FLOAT is in minimal supported set.
Fixes sampler test on beignet (IVB).

Signed-off-by: Jan Vesely 
---
 tests/cl/program/execute/sampler.cl | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tests/cl/program/execute/sampler.cl 
b/tests/cl/program/execute/sampler.cl
index 45960b778..6de1d4462 100644
--- a/tests/cl/program/execute/sampler.cl
+++ b/tests/cl/program/execute/sampler.cl
@@ -10,12 +10,12 @@ local_size:  1 0 0
 name: read from image using linear filtering and unnormalized coords
 kernel_name: readf_f_x
 
-arg_in:  1 image float   0.0 1.0 \
- 2.0 3.0 \
+arg_in:  1 image float4   0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0   \
+  2.0 2.0 2.0 1.0 3.0 3.0 3.0 1.0   \
image_type 2d \
image_width 2 \
image_height 2\
-   image_channel_order INTENSITY \
+   image_channel_order RGBA \
image_channel_data_type FLOAT
 arg_in:  2 sampler normalized_coords 0   \
addressing_mode NONE  \
@@ -27,12 +27,12 @@ arg_out: 0 buffer float[4]  0.0  0.5  1.5  
1.0
 name: read from image using linear filtering and normalized coords
 kernel_name: readf_f_x
 
-arg_in:  1 image float   0.0 1.0 \
- 2.0 3.0 \
+arg_in:  1 image float4   0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0   \
+  2.0 2.0 2.0 1.0 3.0 3.0 3.0 1.0   \
image_type 2d \
image_width 2 \
image_height 2\
-   image_channel_order INTENSITY \
+   image_channel_order RGBA \
image_channel_data_type FLOAT
 arg_in:  2 sampler normalized_coords 1   \
addressing_mode NONE  \
@@ -44,12 +44,12 @@ arg_out: 0 buffer float[4]   0.0   0.5   1.5
   1.0
 name: read from image using clamp_to_edge addressing mode
 kernel_name: readf_f_x
 
-arg_in:  1 image float   0.0 1.0 \
- 2.0 3.0 \
+arg_in:  1 image float4   0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0   \
+  2.0 2.0 2.0 1.0 3.0 3.0 3.0 1.0   \
image_type 2d \
image_width 2 \
image_height 2\
-   image_channel_order INTENSITY \
+   image_channel_order RGBA \
image_channel_data_type FLOAT
 arg_in:  2 sampler normalized_coords 0   \
addressing_mode CLAMP_TO_EDGE  \
-- 
2.13.3

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


Re: [Piglit] [PATCH] arb_provoking_vertex: fix quads-follow-provoking-vertex test

2017-07-17 Thread Neha Bhende
Looks great.


Reviewed-by: Neha Bhende


I suppose, we will also need similar fix in arb-provoking-vertex-render as well


Regards,

Neha


From: Brian Paul 
Sent: Monday, July 17, 2017 11:28:54 AM
To: piglit@lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende; Brian Paul
Subject: [PATCH] arb_provoking_vertex: fix quads-follow-provoking-vertex test

Querying GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION is illegal in
GL 3.2 and later.

Check the GL version to determine the expected error.  Note that the
test says config.supports_gl_core_version = 32.  With NVIDIA's driver
we get a 3.2 context but with Mesa we get a 3.3 context.
---
 .../arb_provoking_vertex/quads-follow-provoking-vertex.c| 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c 
b/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c
index 02e03ee..91a18ce 100644
--- a/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c
+++ b/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c
@@ -45,11 +45,20 @@ piglit_init(int argc, char **argv)
 {
 bool pass = true;
 GLboolean followsProvoking = false;
+   GLint major, minor;
+   GLenum expected_error;
+
+   glGetIntegerv(GL_MAJOR_VERSION, );
+   glGetIntegerv(GL_MINOR_VERSION, );
+   printf("GL version: %d.%d\n", major, minor);
+
+   expected_error =
+   (major * 10 + minor > 32) ? GL_INVALID_ENUM : GL_NO_ERROR;

 glGetBooleanv(GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION,
-);
+ );

-   pass = piglit_check_gl_error(GL_INVALID_ENUM) && pass;
+   pass = piglit_check_gl_error(expected_error) && pass;

 piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
--
1.9.1

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


Re: [Piglit] [PATCH] no-op-paths: Clear between each test.

2017-07-17 Thread Brian Paul

On 07/17/2017 11:12 AM, Eric Anholt wrote:

This matches the behavior of the old glean test.  Without it, the
always-pass subtests would all pass if the first one had passed, and
if a single always-fail subtest failed then the rest would also fail.
---
  tests/spec/gl-1.0/no-op-paths.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/spec/gl-1.0/no-op-paths.c b/tests/spec/gl-1.0/no-op-paths.c
index 4576f35e9a23..7c86b7c30941 100644
--- a/tests/spec/gl-1.0/no-op-paths.c
+++ b/tests/spec/gl-1.0/no-op-paths.c
@@ -250,10 +250,10 @@ piglit_display(void)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);

glDisable(GL_DITHER);
-   glClear(GL_COLOR_BUFFER_BIT);

/* test always-pass paths */
for (i = 0; i < NUM_PATHS; i++) {
+   glClear(GL_COLOR_BUFFER_BIT);
set_path_state(i, ALWAYS_PASS);

/* draw polygon */
@@ -272,6 +272,7 @@ piglit_display(void)

/* enable all always-pass paths */
{
+   glClear(GL_COLOR_BUFFER_BIT);
for (i = 0; i < NUM_PATHS; i++) {
set_path_state(i, ALWAYS_PASS);
}
@@ -292,6 +293,7 @@ piglit_display(void)

/* test never-pass paths */
for (i = 0; i < NUM_PATHS; i++) {
+   glClear(GL_COLOR_BUFFER_BIT);
set_path_state(i, ALWAYS_FAIL);

/* draw polygon */



Reviewed-by: Brian Paul 


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


[Piglit] [PATCH] no-op-paths: Clear between each test.

2017-07-17 Thread Eric Anholt
This matches the behavior of the old glean test.  Without it, the
always-pass subtests would all pass if the first one had passed, and
if a single always-fail subtest failed then the rest would also fail.
---
 tests/spec/gl-1.0/no-op-paths.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/spec/gl-1.0/no-op-paths.c b/tests/spec/gl-1.0/no-op-paths.c
index 4576f35e9a23..7c86b7c30941 100644
--- a/tests/spec/gl-1.0/no-op-paths.c
+++ b/tests/spec/gl-1.0/no-op-paths.c
@@ -250,10 +250,10 @@ piglit_display(void)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
glDisable(GL_DITHER);
-   glClear(GL_COLOR_BUFFER_BIT);

/* test always-pass paths */
for (i = 0; i < NUM_PATHS; i++) {
+   glClear(GL_COLOR_BUFFER_BIT);
set_path_state(i, ALWAYS_PASS);
 
/* draw polygon */
@@ -272,6 +272,7 @@ piglit_display(void)
 
/* enable all always-pass paths */
{
+   glClear(GL_COLOR_BUFFER_BIT);
for (i = 0; i < NUM_PATHS; i++) {
set_path_state(i, ALWAYS_PASS);
}
@@ -292,6 +293,7 @@ piglit_display(void)
 
/* test never-pass paths */
for (i = 0; i < NUM_PATHS; i++) {
+   glClear(GL_COLOR_BUFFER_BIT);
set_path_state(i, ALWAYS_FAIL);
 
/* draw polygon */
-- 
2.11.0

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