aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-11-02 15:39:39 -0700
committerBrian Paul <[email protected]>2009-11-03 09:52:25 -0700
commit800e553e7a1703e33e54f45d0638b67001665fc5 (patch)
tree0300938cff10fe08fe466efd3a36e652c95fb668 /src/mesa
parent4de18fb093e700ee33ed49035ab77f4a9453329a (diff)
mesa: clean-up, remove some flushing in FBO functions
Remove some unneeded flushes. Replace FLUSH_CURRENT w/ FLUSH_VERTICES in other places.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fbobject.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f9aea27860a..319d0f2ce97 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -716,7 +716,9 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here since the render buffer binding has no
+ * effect on rendering state.
+ */
if (renderbuffer) {
newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
@@ -1093,7 +1095,9 @@ _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
return;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here since we're just quering state which is
+ * not effected by rendering.
+ */
switch (pname) {
case GL_RENDERBUFFER_WIDTH_EXT:
@@ -1308,7 +1312,7 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
if (framebuffers[i] > 0) {
@@ -1413,7 +1417,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
return GL_FRAMEBUFFER_COMPLETE_EXT;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
if (buffer->_Status != GL_FRAMEBUFFER_COMPLETE) {
_mesa_test_framebuffer_completeness(ctx, buffer);
@@ -1529,7 +1533,7 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
@@ -1709,7 +1713,7 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
assert(ctx->Driver.FramebufferRenderbuffer);
ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
@@ -1785,7 +1789,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: