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