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.
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;
if (!was_front_buffer_rendering && intel->is_front_buffer_rendering)
dri2InvalidateDrawable(intel->driContext->driDrawablePriv);
}
-
- intel_draw_buffer(ctx);
}
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 */
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;
}
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);
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);
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,
_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);
}
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;