summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-27 15:55:30 -0600
committerBrian Paul <brianp@vmware.com>2010-09-27 15:59:58 -0600
commit1830b8ae997f0312940fece082c18d98c44ac530 (patch)
tree50b150662c81551213242930b2457fbfb3e600f0
parent75589a36e5cc526fb35ef37c91d4616283ecc5f7 (diff)
glean/tfbo: Properly clean up when the driver reports unsupported.
Fixes spurious test failures on the intel driver. (cherry-picked from piglit 35122d69307f0b9c88bc143715f616be80ac5cae)
-rw-r--r--src/glean/tfbo.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glean/tfbo.cpp b/src/glean/tfbo.cpp
index 8b80ded..591e78d 100644
--- a/src/glean/tfbo.cpp
+++ b/src/glean/tfbo.cpp
@@ -651,9 +651,16 @@ FBOTest::testRender2SingleTexture(void)
}
- if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
+ if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ glDeleteTextures(1, textures);
+ if (useFramebuffer)
+ glDeleteFramebuffersEXT_func(1, fbs);
+ if (depthBuffer)
+ glDeleteRenderbuffersEXT_func(1, depth_rb);
+ if (stencilBuffer)
+ glDeleteRenderbuffersEXT_func(1, stencil_rb);
continue;
-
+ }
//
// Render, test the results