GLboolean was_locked = intel->locked;
struct _DriFenceObject *fence;
- if (used == 0)
+ if (used == 0) {
+ driFenceReference(batch->last_fence);
return batch->last_fence;
+ }
/* Add the MI_BATCH_BUFFER_END. Always add an MI_FLUSH - this is a
* performance drain that we would like to avoid.
delta );
#else /* new */
intel_offset_relocation( intel->batch,
- delta,
- dri_bo( buf ),
- flags,
- mask );
+ delta,
+ dri_bo( buf ),
+ flags,
+ mask );
#endif
}
struct pipe_fence_handle *pipe;
} fu;
+ if (fence)
+ assert(!*fence);
+
fu.dri = intel_batchbuffer_flush( intel->batch );
- if (!fu.dri && fence) {
+ if (!fu.dri) {
+ assert(0);
*fence = NULL;
return;
}
if (fence)
*fence = fu.pipe;
else
- iws->pws->fence_reference(iws->pws, &fu.dri, NULL);
+ driFenceUnReference(&fu.dri);
}
-
-// if (0) intel_i915_batch_wait_idle( sws );
}