summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-04-15 18:39:17 -0700
committerEric Anholt <eric@anholt.net>2016-05-19 12:09:44 -0700
commit1cc4003d3d1d90746be03820696406c125a06772 (patch)
tree9fe6f2f3fbb8cb35ae2351a4b65483a6103e6cad
parentfc1af5fef997dd857cdc85c0dd0b7bd8e47ce3b6 (diff)
texsubimage-depth-formats: Check for missing float depth support.
Fixes spurious failure on vc4, which only does unorm depth. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--tests/texturing/texsubimage-depth-formats.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/texturing/texsubimage-depth-formats.c b/tests/texturing/texsubimage-depth-formats.c
index 35263cb6b..aa6f58664 100644
--- a/tests/texturing/texsubimage-depth-formats.c
+++ b/tests/texturing/texsubimage-depth-formats.c
@@ -54,12 +54,13 @@ static const struct size tex_size[] = {
struct format_info {
GLenum internal_format, format, type;
int size;
+ const char *extension;
};
static const struct format_info formats[] = {
- { GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, sizeof(short) },
- { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, sizeof(float) },
- { GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, sizeof(int) },
- { GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, sizeof(int) + sizeof(float) }
+ { GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, sizeof(short), NULL },
+ { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, sizeof(float), "GL_ARB_depth_buffer_float" },
+ { GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, sizeof(int), NULL },
+ { GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, sizeof(int) + sizeof(float), "GL_ARB_depth_buffer_float" }
};
static void
@@ -195,6 +196,11 @@ piglit_display(void)
glGenTextures(ARRAY_SIZE(formats), tex);
for (i = 0; i < ARRAY_SIZE(formats); i++) {
+ if (formats[i].extension &&
+ !piglit_is_extension_supported(formats[i].extension)) {
+ continue;
+ }
+
for (j = 0; j < ARRAY_SIZE(tex_size); j++) {
result = true;
load_texture(i, j);