diff options
author | Eric Anholt <[email protected]> | 2013-06-20 09:53:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-25 19:19:22 -0700 |
commit | 04e03d964578114add4baf30fc77eb8c867fccd9 (patch) | |
tree | 81a12d2453f748f6746d65e2ebed23d9fd8d0315 | |
parent | c39111509d4ff3fd48ce607b24e3c97a0807f712 (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 32 |
1 files 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; } /** |