summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-11-12 07:16:26 -0700
committerBrian Paul <brianp@vmware.com>2010-11-12 07:16:29 -0700
commit16137be5f6ff0d13d1920f16047e7d0b18839299 (patch)
tree6f8eac4b750c59159f119b4232bf3bc11ed886ca
parentf6214d6efabce33e105451f863978fc4e4899e74 (diff)
pbo: fix glIsBuffer() tests
glIsBuffer() should return GL_FALSE if the buffer was generated with glGenBuffers() but never bound with glBindBuffer(). This was incorrect in Mesa until yesteday. Mesa now agrees with AMD, Apple and Intel drivers. NVIDIA is the odd one out. Also, improve error messages and remove another unneeded glIsBuffer() call later.
-rw-r--r--src/glean/tpbo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/glean/tpbo.cpp b/src/glean/tpbo.cpp
index 7d86279..85a7dba 100644
--- a/src/glean/tpbo.cpp
+++ b/src/glean/tpbo.cpp
@@ -200,8 +200,8 @@ bool PBOTest::testSanity(void)
glGenBuffersARB_func(1, pbs);
- if (glIsBufferARB_func(pbs[0]) != GL_TRUE) {
- REPORT_FAILURE("Failed to call glIsBuffersARB");
+ if (glIsBufferARB_func(pbs[0]) != GL_FALSE) {
+ REPORT_FAILURE("glIsBufferARB failed");
return false;
}
@@ -224,7 +224,7 @@ bool PBOTest::testSanity(void)
glDeleteBuffersARB_func(1, pbs);
if (glIsBufferARB_func(pbs[0]) == GL_TRUE) {
- REPORT_FAILURE("Failed to call glIsBuffersARB");
+ REPORT_FAILURE("glIsBufferARB failed");
return false;
}
@@ -615,8 +615,6 @@ bool PBOTest::testTexImage(void)
breakCOWTexture++) {
if (useTexUnpackBuffer) {
glGenBuffersARB_func(1, unpack_pb);
- if (glIsBufferARB_func(unpack_pb[0]) == false)
- return false;
glBindBufferARB_func(GL_PIXEL_UNPACK_BUFFER_ARB, unpack_pb[0]);
glBufferDataARB_func(GL_PIXEL_UNPACK_BUFFER_ARB,
TEXSIZE * TEXSIZE * 3 * sizeof(GLfloat), NULL,