static void intel_dri2_flush_with_flags(__DRIcontext *cPriv, __DRIdrawable *dPriv, unsigned flags, enum __DRI2throttleReason reason) { struct brw_context *brw = cPriv->driverPrivate; if (!brw) return; struct gl_context *ctx = &brw->ctx; FLUSH_VERTICES(ctx, 0); if (flags & __DRI2_FLUSH_DRAWABLE) intel_resolve_for_dri2_flush(brw, dPriv); if (reason == __DRI2_THROTTLE_SWAPBUFFER) brw->need_swap_throttle = true; if (reason == __DRI2_THROTTLE_FLUSHFRONT) brw->need_flush_throttle = true; intel_batchbuffer_flush(brw); if (INTEL_DEBUG & DEBUG_AUB) { aub_dump_bmp(ctx); } }
void intelDestroyContext(__DRIcontext * driContextPriv) { struct brw_context *brw = (struct brw_context *) driContextPriv->driverPrivate; struct gl_context *ctx = &brw->ctx; assert(brw); /* should never be null */ if (!brw) return; /* Dump a final BMP in case the application doesn't call SwapBuffers */ if (INTEL_DEBUG & DEBUG_AUB) { intel_batchbuffer_flush(brw); aub_dump_bmp(&brw->ctx); } _mesa_meta_free(&brw->ctx); if (INTEL_DEBUG & DEBUG_SHADER_TIME) { /* Force a report. */ brw->shader_time.report_time = 0; brw_collect_and_report_shader_time(brw); brw_destroy_shader_time(brw); } brw_destroy_state(brw); brw_draw_destroy(brw); drm_intel_bo_unreference(brw->curbe.curbe_bo); free(brw->curbe.last_buf); free(brw->curbe.next_buf); drm_intel_gem_context_destroy(brw->hw_ctx); if (ctx->swrast_context) { _swsetup_DestroyContext(&brw->ctx); _tnl_DestroyContext(&brw->ctx); } _vbo_DestroyContext(&brw->ctx); if (ctx->swrast_context) _swrast_DestroyContext(&brw->ctx); intel_batchbuffer_free(brw); drm_intel_bo_unreference(brw->first_post_swapbuffers_batch); brw->first_post_swapbuffers_batch = NULL; driDestroyOptionCache(&brw->optionCache); /* free the Mesa context */ _mesa_free_context_data(&brw->ctx); ralloc_free(brw); driContextPriv->driverPrivate = NULL; }
void intelDestroyContext(__DRIcontext * driContextPriv) { struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate; struct gl_context *ctx = &intel->ctx; assert(intel); /* should never be null */ if (intel) { INTEL_FIREVERTICES(intel); /* Dump a final BMP in case the application doesn't call SwapBuffers */ if (INTEL_DEBUG & DEBUG_AUB) { intel_batchbuffer_flush(intel); aub_dump_bmp(&intel->ctx); } _mesa_meta_free(&intel->ctx); intel->vtbl.destroy(intel); if (ctx->swrast_context) { _swsetup_DestroyContext(&intel->ctx); _tnl_DestroyContext(&intel->ctx); } _vbo_DestroyContext(&intel->ctx); if (ctx->swrast_context) _swrast_DestroyContext(&intel->ctx); intel->Fallback = 0x0; /* don't call _swrast_Flush later */ intel_batchbuffer_free(intel); free(intel->prim.vb); intel->prim.vb = NULL; drm_intel_bo_unreference(intel->prim.vb_bo); intel->prim.vb_bo = NULL; drm_intel_bo_unreference(intel->first_post_swapbuffers_batch); intel->first_post_swapbuffers_batch = NULL; driDestroyOptionCache(&intel->optionCache); /* free the Mesa context */ _mesa_free_context_data(&intel->ctx); _math_matrix_dtr(&intel->ViewportMatrix); ralloc_free(intel); driContextPriv->driverPrivate = NULL; } }
static void intelDRI2Flush(__DRIdrawable *drawable) { GET_CURRENT_CONTEXT(ctx); struct brw_context *brw = brw_context(ctx); if (brw == NULL) return; intel_resolve_for_dri2_flush(brw, drawable); brw->need_throttle = true; if (brw->batch.used) intel_batchbuffer_flush(brw); if (INTEL_DEBUG & DEBUG_AUB) { aub_dump_bmp(ctx); } }
static void intelDRI2Flush(__DRIdrawable *drawable) { GET_CURRENT_CONTEXT(ctx); struct intel_context *intel = intel_context(ctx); if (intel == NULL) return; INTEL_FIREVERTICES(intel); intel->need_throttle = true; if (intel->batch.used) intel_batchbuffer_flush(intel); if (INTEL_DEBUG & DEBUG_AUB) { aub_dump_bmp(ctx); } }
void intelDestroyContext(__DRIcontext * driContextPriv) { struct brw_context *brw = (struct brw_context *) driContextPriv->driverPrivate; struct gl_context *ctx = &brw->ctx; assert(brw); /* should never be null */ if (brw) { /* Dump a final BMP in case the application doesn't call SwapBuffers */ if (INTEL_DEBUG & DEBUG_AUB) { intel_batchbuffer_flush(brw); aub_dump_bmp(&brw->ctx); } _mesa_meta_free(&brw->ctx); brw->vtbl.destroy(brw); if (ctx->swrast_context) { _swsetup_DestroyContext(&brw->ctx); _tnl_DestroyContext(&brw->ctx); } _vbo_DestroyContext(&brw->ctx); if (ctx->swrast_context) _swrast_DestroyContext(&brw->ctx); intel_batchbuffer_free(brw); drm_intel_bo_unreference(brw->first_post_swapbuffers_batch); brw->first_post_swapbuffers_batch = NULL; driDestroyOptionCache(&brw->optionCache); /* free the Mesa context */ _mesa_free_context_data(&brw->ctx); ralloc_free(brw); driContextPriv->driverPrivate = NULL; } }