From 04e03d964578114add4baf30fc77eb8c867fccd9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 20 Jun 2013 09:53:27 -0700 Subject: [PATCH] i965: Remove the rest of brw_update_draw_buffer(). 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. Reviewed-by: Anuj Phogat Reviewed-by: Kenneth Graunke --- 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 16d1bd1a833..5bc4eb2d54b 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; } /** -- 2.30.2