[Piglit] [PATCH 5/9] fbo-formats: add texture_stencil8 support
Dave Airlie
airlied at gmail.com
Mon Apr 6 20:39:47 PDT 2015
From: Dave Airlie <airlied at redhat.com>
Make sure to disable stencil textures everywhere we disable depth ones.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
tests/fbo/fbo-alphatest-formats.c | 1 +
tests/fbo/fbo-blending-formats.c | 3 ++-
tests/fbo/fbo-clear-formats.c | 7 +++++--
tests/fbo/fbo-colormask-formats.c | 3 ++-
tests/fbo/fbo-formats.h | 11 +++++++++++
tests/fbo/fbo-generatemipmap-formats.c | 6 +++---
tests/texturing/getteximage-formats.c | 1 +
7 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c
index cb07f1d..c96245c 100644
--- a/tests/fbo/fbo-alphatest-formats.c
+++ b/tests/fbo/fbo-alphatest-formats.c
@@ -76,6 +76,7 @@ static enum piglit_result test_format(const struct format_desc *format)
if (format->base_internal_format == GL_DEPTH_COMPONENT ||
format->base_internal_format == GL_DEPTH_STENCIL ||
+ format->base_internal_format == GL_STENCIL_INDEX ||
format->base_internal_format == GL_ALPHA)
return PIGLIT_SKIP;
diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c
index 4632944..5eb3d8e 100644
--- a/tests/fbo/fbo-blending-formats.c
+++ b/tests/fbo/fbo-blending-formats.c
@@ -131,7 +131,8 @@ static enum piglit_result test_format(const struct format_desc *format)
dst5[3]*(1-src5[3]) + src5[3]*src5[3]};
if (format->base_internal_format == GL_DEPTH_COMPONENT ||
- format->base_internal_format == GL_DEPTH_STENCIL)
+ format->base_internal_format == GL_DEPTH_STENCIL ||
+ format->base_internal_format == GL_STENCIL_INDEX)
return PIGLIT_SKIP;
glGenFramebuffersEXT(1, &fb);
diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
index e4413bb..61fb162 100644
--- a/tests/fbo/fbo-clear-formats.c
+++ b/tests/fbo/fbo-clear-formats.c
@@ -273,7 +273,7 @@ create_tex(GLenum internalformat, GLenum baseformat)
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, level);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, level);
- if (clear_stencil) {
+ if (clear_stencil || baseformat == GL_STENCIL_INDEX) {
if (!do_stencil_clear(format, tex, level, dim)) {
glDeleteTextures(1, &tex);
return 0;
@@ -522,7 +522,10 @@ test_format(const struct format_desc *format)
printf("Testing %s", format->name);
- if (clear_stencil && format->base_internal_format != GL_DEPTH_STENCIL) {
+ if (format->base_internal_format == GL_STENCIL_INDEX)
+ clear_stencil = true;
+
+ if (clear_stencil && format->base_internal_format != GL_DEPTH_STENCIL && format->base_internal_format != GL_STENCIL_INDEX) {
printf(" - no stencil.\n");
return PIGLIT_SKIP;
}
diff --git a/tests/fbo/fbo-colormask-formats.c b/tests/fbo/fbo-colormask-formats.c
index 71e6bff..4227ed0 100644
--- a/tests/fbo/fbo-colormask-formats.c
+++ b/tests/fbo/fbo-colormask-formats.c
@@ -59,7 +59,8 @@ static enum piglit_result test_format(const struct format_desc *format)
float defaults[] = {-1, -1, -1, -1};
if (format->base_internal_format == GL_DEPTH_COMPONENT ||
- format->base_internal_format == GL_DEPTH_STENCIL)
+ format->base_internal_format == GL_DEPTH_STENCIL ||
+ format->base_internal_format == GL_STENCIL_INDEX)
return PIGLIT_SKIP;
glGenFramebuffersEXT(1, &fb);
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index 2d44105..655d149 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -310,6 +310,10 @@ static const struct format_desc arb_es2_compatibility[] = {
FORMAT(GL_RGB565, GL_RGB)
};
+static const struct format_desc arb_texture_stencil8[] = {
+ FORMAT(GL_STENCIL_INDEX8, GL_STENCIL_INDEX)
+};
+
struct test_desc {
const struct format_desc *format;
unsigned num_formats;
@@ -499,6 +503,13 @@ static const struct test_desc test_sets[] = {
GL_FLOAT,
{"GL_ARB_texture_compression_bptc"}
},
+ {
+ arb_texture_stencil8,
+ ARRAY_SIZE(arb_texture_stencil8),
+ "GL_ARB_texture_stencil8",
+ GL_UNSIGNED_BYTE,
+ {"GL_ARB_texture_stencil8"}
+ },
};
static GLboolean
diff --git a/tests/fbo/fbo-generatemipmap-formats.c b/tests/fbo/fbo-generatemipmap-formats.c
index f054453..f5dd0b3 100644
--- a/tests/fbo/fbo-generatemipmap-formats.c
+++ b/tests/fbo/fbo-generatemipmap-formats.c
@@ -488,7 +488,7 @@ piglit_display(void)
/* Skip testing textures with depth-stencil internal
* formats as they are not allowed in glGenerateMipmap.
*/
- if (format.base_internal_format == GL_DEPTH_STENCIL)
+ if (format.base_internal_format == GL_DEPTH_STENCIL || format.base_internal_format == GL_STENCIL_INDEX)
continue;
pass = test_format(&format,
@@ -498,7 +498,7 @@ piglit_display(void)
set_npot(GL_TRUE);
for (i = 0; i < test_sets[test_index].num_formats; i++) {
format = test_sets[test_index].format[i];
- if (format.base_internal_format == GL_DEPTH_STENCIL)
+ if (format.base_internal_format == GL_DEPTH_STENCIL || format.base_internal_format == GL_STENCIL_INDEX)
continue;
pass = test_format(&format,
@@ -508,7 +508,7 @@ piglit_display(void)
}
} else {
format = test_sets[test_index].format[format_index];
- if (format.base_internal_format != GL_DEPTH_STENCIL)
+ if (format.base_internal_format != GL_DEPTH_STENCIL && format.base_internal_format != GL_STENCIL_INDEX)
pass = test_format(&format,
test_sets[test_index].basetype);
}
diff --git a/tests/texturing/getteximage-formats.c b/tests/texturing/getteximage-formats.c
index 1fbbdfd..715d5df 100644
--- a/tests/texturing/getteximage-formats.c
+++ b/tests/texturing/getteximage-formats.c
@@ -455,6 +455,7 @@ supported_format_set(const struct test_desc *set)
if (set->format == ext_texture_integer ||
set->format == ext_packed_depth_stencil ||
+ set->format == arb_texture_stencil8 ||
set->format == arb_texture_rg_int ||
set->format == arb_depth_texture ||
set->format == arb_depth_buffer_float) {
--
2.1.0
More information about the Piglit
mailing list