if (brw->batch.used == 0)
return 0;
- if (intel->first_post_swapbuffers_batch == NULL) {
- intel->first_post_swapbuffers_batch = brw->batch.bo;
- drm_intel_bo_reference(intel->first_post_swapbuffers_batch);
+ if (brw->first_post_swapbuffers_batch == NULL) {
+ brw->first_post_swapbuffers_batch = brw->batch.bo;
+ drm_intel_bo_reference(brw->first_post_swapbuffers_batch);
}
if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
* the swap, and getting our hands on that doesn't seem worth it,
* so we just us the first batch we emitted after the last swap.
*/
- if (intel->need_throttle && intel->first_post_swapbuffers_batch) {
+ if (brw->need_throttle && brw->first_post_swapbuffers_batch) {
if (!brw->disable_throttling)
- drm_intel_bo_wait_rendering(intel->first_post_swapbuffers_batch);
- drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
- intel->first_post_swapbuffers_batch = NULL;
- intel->need_throttle = false;
+ drm_intel_bo_wait_rendering(brw->first_post_swapbuffers_batch);
+ drm_intel_bo_unreference(brw->first_post_swapbuffers_batch);
+ brw->first_post_swapbuffers_batch = NULL;
+ brw->need_throttle = false;
}
}
intel_glFlush(struct gl_context *ctx)
{
struct brw_context *brw = brw_context(ctx);
- struct intel_context *intel = intel_context(ctx);
intel_flush(ctx);
intel_flush_front(ctx);
if (brw->is_front_buffer_rendering)
- intel->need_throttle = true;
+ brw->need_throttle = true;
}
void
intel_batchbuffer_free(brw);
- drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
- intel->first_post_swapbuffers_batch = NULL;
+ drm_intel_bo_unreference(brw->first_post_swapbuffers_batch);
+ brw->first_post_swapbuffers_batch = NULL;
driDestroyOptionCache(&brw->optionCache);