[Mesa-dev] [PATCH 11/11] i965: Remove the rest of brw_update_draw_buffer().
Eric Anholt
eric at anholt.net
Thu Jun 20 23:08:04 PDT 2013
The last piece of code with an effect was flagging _NEW_BUFFERS. Only,
that is already flagged from everything that calls this function: Mesa GL
state updates flag it before even calling down into the driver, and the
calls from the DRI2 window system framebuffer update path end up flagging
it as part of the ResizeBuffers() hook.
---
src/mesa/drivers/dri/i965/brw_vtbl.c | 32 +++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 16d1bd1..5bc4eb2 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -92,38 +92,16 @@ static void brw_destroy_context( struct intel_context *intel )
}
/**
- * Update the hardware state for drawing into a window or framebuffer object.
+ * Stub state update function for i915.
*
- * Called by glDrawBuffer, glBindFramebufferEXT, MakeCurrent, and other
- * places within the driver.
- *
- * Basically, this needs to be called any time the current framebuffer
- * changes, the renderbuffers change, or we need to draw into different
- * color buffers.
+ * In i915, hardware state updates for drawbuffer changes are driven by
+ * driver-internal calls to GL state update hooks. In i965, we recompute the
+ * apporpriate state at draw time as a result of _NEW_BUFFERS being set, so we
+ * don't need this hook.
*/
static void
brw_update_draw_buffer(struct intel_context *intel)
{
- struct gl_context *ctx = &intel->ctx;
- struct gl_framebuffer *fb = ctx->DrawBuffer;
-
- if (!fb) {
- /* this can happen during the initial context initialization */
- return;
- }
-
- if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- /* this may occur when we're called by glBindFrameBuffer() during
- * the process of someone setting up renderbuffers, etc.
- */
- /*_mesa_debug(ctx, "DrawBuffer: incomplete user FBO\n");*/
- return;
- }
-
- /* The driver uses this in places that need to look up
- * renderbuffers' buffer objects.
- */
- intel->NewGLState |= _NEW_BUFFERS;
}
/**
--
1.8.3.rc0
More information about the mesa-dev
mailing list