[Piglit] [PATCH] texsubimage-depth-formats: check for ARB_depth_buffer_float
Ilia Mirkin
imirkin at alum.mit.edu
Sun Mar 15 17:41:29 PDT 2015
Avoid unnecessary failures on drivers not supporting float depth
buffers.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
tests/texturing/texsubimage-depth-formats.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/texturing/texsubimage-depth-formats.c b/tests/texturing/texsubimage-depth-formats.c
index b6d9416..2d35e63 100644
--- a/tests/texturing/texsubimage-depth-formats.c
+++ b/tests/texturing/texsubimage-depth-formats.c
@@ -55,8 +55,8 @@ struct format_info {
};
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_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, sizeof(float) },
{ GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, sizeof(int) + sizeof(float) }
};
@@ -166,6 +166,9 @@ piglit_display(void)
glGenTextures(ARRAY_SIZE(formats), tex);
for (i = 0; i < ARRAY_SIZE(formats); i++) {
+ if (!piglit_is_extension_supported("GL_ARB_depth_buffer_float") &&
+ i >= 2)
+ continue;
for (j = 0; j < ARRAY_SIZE(tex_size); j++) {
result = true;
load_texture(i, j);
--
2.0.5
More information about the Piglit
mailing list