diff options
author | Eric Anholt <eric@anholt.net> | 2011-06-28 16:39:15 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-07-06 11:17:20 -0700 |
commit | 07e5295b6fe77253ea38dbc0d649b20e7275373a (patch) | |
tree | fa51c3cfc7d339ff23eb4aaefeea7236e47fe806 /src/mesa/main/feedback.c | |
parent | c9aac11713c6238a8e3a89e8501e6e686fa811a7 (diff) | |
download | external_mesa3d-07e5295b6fe77253ea38dbc0d649b20e7275373a.zip external_mesa3d-07e5295b6fe77253ea38dbc0d649b20e7275373a.tar.gz external_mesa3d-07e5295b6fe77253ea38dbc0d649b20e7275373a.tar.bz2 |
mesa: Don't error on glFeedbackBuffer(size = 0, buffer = NULL)
The existing error result doesn't appear in the GL 2.1 or 3.2
compatibility specs, and triggers an unexpected GL error in Intel's
oglconform when it tries to reset the feedback state after usage so
that the "diff the state at error time vs. context init time" code
doesn't generate spurious diffs. The unexpected GL error then
translates into testcase failure. Brian wants the safety check on
buffer = NULL, though, so that people can't as easily set up a broken
buffer.
Diffstat (limited to 'src/mesa/main/feedback.c')
-rw-r--r-- | src/mesa/main/feedback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index fcb089f..597ec1e 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -64,7 +64,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(size<0)" ); return; } - if (!buffer) { + if (!buffer && size > 0) { _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" ); ctx->Feedback.BufferSize = 0; return; |