i965: Drop code for calling the empty brw_update_draw_buffers() hook.
authorEric Anholt <eric@anholt.net>
Fri, 21 Jun 2013 18:08:34 +0000 (11:08 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Jun 2013 20:35:25 +0000 (13:35 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vtbl.c
src/mesa/drivers/dri/i965/intel_buffers.c
src/mesa/drivers/dri/i965/intel_buffers.h
src/mesa/drivers/dri/i965/intel_context.c
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/drivers/dri/i965/intel_fbo.c

index fc4535429ffff67eb343cd66b67e1acf9ddc236d..830bc7cb51e660e339ea657872742507335126e5 100644 (file)
@@ -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;
index fdad480cb39ca392d4bb2ba4fe89c6c08777db8d..6bb0d0f5cb5ae98a026f6564f302c7d5a458b426 100644 (file)
@@ -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);
 }
 
 
index 320ea3a3a263b051f6d84701e7d11787945ca207..a3a99cea5cdffae612ee70d8a1bed5c692b133e4 100644 (file)
@@ -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 */
index 11092d5b2ea36c5f44f78a6dcbfad1b5593df1f7..27f6b9b69ba732c1d6c6ac57934ed35997b2f79f 100644 (file)
@@ -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);
index 82202071ec1a4805d1fa97d91255a56723a2e774..b7df88eb2590d638a8c6828ed6412478b3fa53b7 100644 (file)
@@ -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);
 
index bd5f70f8feb87e63732338ca2d51e1c67d095cfd..dea5ffffc0ec12cf8015b1a7502acdaebf11595e 100644 (file)
@@ -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;