<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 8:39 PM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
<br>
Make sure to disable stencil textures everywhere we disable depth ones.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
---<br>
 tests/fbo/fbo-alphatest-formats.c      |  1 +<br>
 tests/fbo/fbo-blending-formats.c       |  3 ++-<br>
 tests/fbo/fbo-clear-formats.c          |  7 +++++--<br>
 tests/fbo/fbo-colormask-formats.c      |  3 ++-<br>
 tests/fbo/fbo-formats.h                | 11 +++++++++++<br>
 tests/fbo/fbo-generatemipmap-formats.c |  6 +++---<br>
 tests/texturing/getteximage-formats.c  |  1 +<br>
 7 files changed, 25 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c<br>
index cb07f1d..c96245c 100644<br>
--- a/tests/fbo/fbo-alphatest-formats.c<br>
+++ b/tests/fbo/fbo-alphatest-formats.c<br>
@@ -76,6 +76,7 @@ static enum piglit_result test_format(const struct format_desc *format)<br>
<br>
         if (format->base_internal_format == GL_DEPTH_COMPONENT ||<br>
             format->base_internal_format == GL_DEPTH_STENCIL ||<br>
+            format->base_internal_format == GL_STENCIL_INDEX ||<br>
            format->base_internal_format == GL_ALPHA)<br>
                return PIGLIT_SKIP;<br>
<br>
diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c<br>
index 4632944..5eb3d8e 100644<br>
--- a/tests/fbo/fbo-blending-formats.c<br>
+++ b/tests/fbo/fbo-blending-formats.c<br>
@@ -131,7 +131,8 @@ static enum piglit_result test_format(const struct format_desc *format)<br>
                        dst5[3]*(1-src5[3]) + src5[3]*src5[3]};<br>
<br>
         if (format->base_internal_format == GL_DEPTH_COMPONENT ||<br>
-            format->base_internal_format == GL_DEPTH_STENCIL)<br>
+            format->base_internal_format == GL_DEPTH_STENCIL ||<br>
+            format->base_internal_format == GL_STENCIL_INDEX)<br>
                return PIGLIT_SKIP;<br>
<br>
        glGenFramebuffersEXT(1, &fb);<br>
diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c<br>
index e4413bb..61fb162 100644<br>
--- a/tests/fbo/fbo-clear-formats.c<br>
+++ b/tests/fbo/fbo-clear-formats.c<br>
@@ -273,7 +273,7 @@ create_tex(GLenum internalformat, GLenum baseformat)<br>
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, level);<br>
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, level);<br>
<br>
-               if (clear_stencil) {<br>
+               if (clear_stencil || baseformat == GL_STENCIL_INDEX) {<br>
                        if (!do_stencil_clear(format, tex, level, dim)) {<br>
                                glDeleteTextures(1, &tex);<br>
                                return 0;<br>
@@ -522,7 +522,10 @@ test_format(const struct format_desc *format)<br>
<br>
        printf("Testing %s", format->name);<br>
<br>
-       if (clear_stencil && format->base_internal_format != GL_DEPTH_STENCIL) {<br>
+       if (format->base_internal_format == GL_STENCIL_INDEX)<br>
+               clear_stencil = true;<br>
+<br>
+       if (clear_stencil && format->base_internal_format != GL_DEPTH_STENCIL && format->base_internal_format != GL_STENCIL_INDEX) {<br></blockquote><div>Break the condition in to two lines. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                printf(" - no stencil.\n");<br>
                return PIGLIT_SKIP;<br>
        }<br>
diff --git a/tests/fbo/fbo-colormask-formats.c b/tests/fbo/fbo-colormask-formats.c<br>
index 71e6bff..4227ed0 100644<br>
--- a/tests/fbo/fbo-colormask-formats.c<br>
+++ b/tests/fbo/fbo-colormask-formats.c<br>
@@ -59,7 +59,8 @@ static enum piglit_result test_format(const struct format_desc *format)<br>
        float defaults[] = {-1, -1, -1, -1};<br>
<br>
        if (format->base_internal_format == GL_DEPTH_COMPONENT ||<br>
-           format->base_internal_format == GL_DEPTH_STENCIL)<br>
+           format->base_internal_format == GL_DEPTH_STENCIL ||<br>
+           format->base_internal_format == GL_STENCIL_INDEX)<br>
                return PIGLIT_SKIP;<br>
<br>
        glGenFramebuffersEXT(1, &fb);<br>
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h<br>
index 2d44105..655d149 100644<br>
--- a/tests/fbo/fbo-formats.h<br>
+++ b/tests/fbo/fbo-formats.h<br>
@@ -310,6 +310,10 @@ static const struct format_desc arb_es2_compatibility[] = {<br>
        FORMAT(GL_RGB565, GL_RGB)<br>
 };<br>
<br>
+static const struct format_desc arb_texture_stencil8[] = {<br>
+       FORMAT(GL_STENCIL_INDEX8, GL_STENCIL_INDEX)<br>
+};<br>
+<br>
 struct test_desc {<br>
        const struct format_desc *format;<br>
        unsigned num_formats;<br>
@@ -499,6 +503,13 @@ static const struct test_desc test_sets[] = {<br>
                GL_FLOAT,<br>
                {"GL_ARB_texture_compression_bptc"}<br>
        },<br>
+       {<br>
+               arb_texture_stencil8,<br>
+               ARRAY_SIZE(arb_texture_stencil8),<br>
+               "GL_ARB_texture_stencil8",<br>
+               GL_UNSIGNED_BYTE,<br>
+               {"GL_ARB_texture_stencil8"}<br>
+       },<br>
 };<br>
<br>
 static GLboolean<br>
diff --git a/tests/fbo/fbo-generatemipmap-formats.c b/tests/fbo/fbo-generatemipmap-formats.c<br>
index f054453..f5dd0b3 100644<br>
--- a/tests/fbo/fbo-generatemipmap-formats.c<br>
+++ b/tests/fbo/fbo-generatemipmap-formats.c<br>
@@ -488,7 +488,7 @@ piglit_display(void)<br>
                        /* Skip testing textures with depth-stencil internal<br>
                         * formats as they are not allowed in glGenerateMipmap.<br>
                         */<br>
-                       if (format.base_internal_format == GL_DEPTH_STENCIL)<br>
+                       if (format.base_internal_format == GL_DEPTH_STENCIL || format.base_internal_format == GL_STENCIL_INDEX)<br></blockquote><div>Same here. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                continue;<br>
<br>
                        pass = test_format(&format,<br>
@@ -498,7 +498,7 @@ piglit_display(void)<br>
                        set_npot(GL_TRUE);<br>
                        for (i = 0; i < test_sets[test_index].num_formats; i++) {<br>
                                format = test_sets[test_index].format[i];<br>
-                               if (format.base_internal_format == GL_DEPTH_STENCIL)<br>
+                               if (format.base_internal_format == GL_DEPTH_STENCIL || format.base_internal_format == GL_STENCIL_INDEX)<br></blockquote><div>and here. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        continue;<br>
<br>
                                pass = test_format(&format,<br>
@@ -508,7 +508,7 @@ piglit_display(void)<br>
                }<br>
        } else {<br>
                format = test_sets[test_index].format[format_index];<br>
-               if (format.base_internal_format != GL_DEPTH_STENCIL)<br>
+               if (format.base_internal_format != GL_DEPTH_STENCIL && format.base_internal_format != GL_STENCIL_INDEX)<br></blockquote><div>and here. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                        pass = test_format(&format,<br>
                                           test_sets[test_index].basetype);<br>
        }<br>
diff --git a/tests/texturing/getteximage-formats.c b/tests/texturing/getteximage-formats.c<br>
index 1fbbdfd..715d5df 100644<br>
--- a/tests/texturing/getteximage-formats.c<br>
+++ b/tests/texturing/getteximage-formats.c<br>
@@ -455,6 +455,7 @@ supported_format_set(const struct test_desc *set)<br>
<br>
        if (set->format == ext_texture_integer ||<br>
                 set->format == ext_packed_depth_stencil ||<br>
+                set->format == arb_texture_stencil8 ||<br>
                 set->format == arb_texture_rg_int ||<br>
                 set->format == arb_depth_texture ||<br>
                 set->format == arb_depth_buffer_float) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.0<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a></font></span></blockquote><div><br></div><div>With above comments fixed, patch is:</div><div>Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></div></div><br></div></div>