arb_texture_storage: allow for depth component formats to be unsupported

Submitted by Ilia Mirkin on Aug. 10, 2014, 5:20 p.m.

Details

Message ID 1407691202-24048-1-git-send-email-imirkin@alum.mit.edu
State New
Headers show

Not browsing as part of any series.

Commit Message

Ilia Mirkin Aug. 10, 2014, 5:20 p.m.
nouveau_vieux does not support GL_ARB_depth_texture.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
 tests/spec/arb_texture_storage/texture-storage.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_texture_storage/texture-storage.c b/tests/spec/arb_texture_storage/texture-storage.c
index e0006a6..d71cc98 100644
--- a/tests/spec/arb_texture_storage/texture-storage.c
+++ b/tests/spec/arb_texture_storage/texture-storage.c
@@ -464,9 +464,12 @@  test_internal_formats(void)
 	};
 	GLuint tex;
 	bool pass = true;
-	int i;
+	int i, formats = ARRAY_SIZE(legal_formats);
+
+	if (!piglit_is_extension_supported("GL_ARB_depth_texture"))
+		formats -= 2;
 
-	for (i = 0; i < ARRAY_SIZE(legal_formats); i++) {
+	for (i = 0; i < formats; i++) {
 		glGenTextures(1, &tex);
 		glBindTexture(target, tex);