From: Eric Anholt Date: Fri, 21 Jun 2013 18:08:34 +0000 (-0700) Subject: i965: Drop code for calling the empty brw_update_draw_buffers() hook. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b67cd29a12b59030267296ca81d28e602cebfe4;p=mesa.git i965: Drop code for calling the empty brw_update_draw_buffers() hook. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index fc4535429ff..830bc7cb51e 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -91,19 +91,6 @@ static void brw_destroy_context( struct intel_context *intel ) drm_intel_gem_context_destroy(intel->hw_ctx); } -/** - * Stub state update function for i915. - * - * 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) -{ -} - /** * called from intel_batchbuffer_flush and children before sending a * batchbuffer off. @@ -199,7 +186,6 @@ void brwInitVtbl( struct brw_context *brw ) brw->intel.vtbl.new_batch = brw_new_batch; brw->intel.vtbl.finish_batch = brw_finish_batch; brw->intel.vtbl.destroy = brw_destroy_context; - brw->intel.vtbl.update_draw_buffer = brw_update_draw_buffer; brw->intel.vtbl.debug_batch = brw_debug_batch; brw->intel.vtbl.annotate_aub = brw_annotate_aub; brw->intel.vtbl.render_target_supported = brw_render_target_supported; diff --git a/src/mesa/drivers/dri/i965/intel_buffers.c b/src/mesa/drivers/dri/i965/intel_buffers.c index fdad480cb39..6bb0d0f5cb5 100644 --- a/src/mesa/drivers/dri/i965/intel_buffers.c +++ b/src/mesa/drivers/dri/i965/intel_buffers.c @@ -84,8 +84,6 @@ intelDrawBuffer(struct gl_context * ctx, GLenum mode) if (!was_front_buffer_rendering && intel->is_front_buffer_rendering) dri2InvalidateDrawable(intel->driContext->driDrawablePriv); } - - intel_draw_buffer(ctx); } diff --git a/src/mesa/drivers/dri/i965/intel_buffers.h b/src/mesa/drivers/dri/i965/intel_buffers.h index 320ea3a3a26..a3a99cea5cd 100644 --- a/src/mesa/drivers/dri/i965/intel_buffers.h +++ b/src/mesa/drivers/dri/i965/intel_buffers.h @@ -40,14 +40,6 @@ extern struct intel_region *intel_readbuf_region(struct intel_context *intel); extern void intel_check_front_buffer_rendering(struct intel_context *intel); -static inline void -intel_draw_buffer(struct gl_context * ctx) -{ - struct intel_context *intel = intel_context(ctx); - - intel->vtbl.update_draw_buffer(intel); -} - extern void intelInitBufferFuncs(struct dd_function_table *functions); #endif /* INTEL_BUFFERS_H */ diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 11092d5b2ea..27f6b9b69ba 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -251,7 +251,6 @@ intel_prepare_render(struct intel_context *intel) if (drawable && drawable->dri2.stamp != driContext->dri2.draw_stamp) { if (drawable->lastStamp != drawable->dri2.stamp) intel_update_renderbuffers(driContext, drawable); - intel_draw_buffer(&intel->ctx); driContext->dri2.draw_stamp = drawable->dri2.stamp; } @@ -804,12 +803,6 @@ intelMakeCurrent(__DRIcontext * driContextPriv, intel_gles3_srgb_workaround(intel, ctx->WinSysDrawBuffer); intel_gles3_srgb_workaround(intel, ctx->WinSysReadBuffer); - - /* We do this in intel_prepare_render() too, but intel->ctx.DrawBuffer - * is NULL at that point. We can't call _mesa_makecurrent() - * first, since we need the buffer size for the initial - * viewport. So just call intel_draw_buffer() again here. */ - intel_draw_buffer(ctx); } else { _mesa_make_current(NULL, NULL, NULL); diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 82202071ec1..b7df88eb259 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -137,8 +137,6 @@ struct intel_context void (*finish_batch) (struct intel_context * intel); void (*new_batch) (struct intel_context * intel); - void (*update_draw_buffer)(struct intel_context *intel); - void (*invalidate_state) (struct intel_context *intel, GLuint new_state); diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index bd5f70f8feb..dea5ffffc0e 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -425,37 +425,6 @@ intel_new_renderbuffer(struct gl_context * ctx, GLuint name) return rb; } - -/** - * Called via glBindFramebufferEXT(). - */ -static void -intel_bind_framebuffer(struct gl_context * ctx, GLenum target, - struct gl_framebuffer *fb, struct gl_framebuffer *fbread) -{ - if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) { - intel_draw_buffer(ctx); - } - else { - /* don't need to do anything if target == GL_READ_FRAMEBUFFER_EXT */ - } -} - - -/** - * Called via glFramebufferRenderbufferEXT(). - */ -static void -intel_framebuffer_renderbuffer(struct gl_context * ctx, - struct gl_framebuffer *fb, - GLenum attachment, struct gl_renderbuffer *rb) -{ - DBG("Intel FramebufferRenderbuffer %u %u\n", fb->Name, rb ? rb->Name : 0); - - _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb); - intel_draw_buffer(ctx); -} - static bool intel_renderbuffer_update_wrapper(struct intel_context *intel, struct intel_renderbuffer *irb, @@ -560,9 +529,6 @@ intel_render_texture(struct gl_context * ctx, _mesa_get_format_name(image->TexFormat), att->Texture->Name, image->Width, image->Height, image->Depth, rb->RefCount); - - /* update drawing region, etc */ - intel_draw_buffer(ctx); } @@ -934,8 +900,6 @@ intel_fbo_init(struct intel_context *intel) intel->ctx.Driver.NewRenderbuffer = intel_new_renderbuffer; intel->ctx.Driver.MapRenderbuffer = intel_map_renderbuffer; intel->ctx.Driver.UnmapRenderbuffer = intel_unmap_renderbuffer; - intel->ctx.Driver.BindFramebuffer = intel_bind_framebuffer; - intel->ctx.Driver.FramebufferRenderbuffer = intel_framebuffer_renderbuffer; intel->ctx.Driver.RenderTexture = intel_render_texture; intel->ctx.Driver.FinishRenderTexture = intel_finish_render_texture; intel->ctx.Driver.ValidateFramebuffer = intel_validate_framebuffer;