Beispiel #1
0
CM_RT_API INT CmEvent::WaitForTaskFinished(DWORD dwTimeOutMs)
{
	INT result = CM_SUCCESS;
	m_pQueue->AcquireQueueLock();

	while (m_Status == CM_STATUS_QUEUED) {
		m_pQueue->FlushTaskWithoutSync();
	}

	Query();

	while (m_Status != CM_STATUS_FINISHED) {
		if (m_OsData) {
			result = drm_intel_gem_bo_wait((drm_intel_bo*)m_OsData, 1000000LL*dwTimeOutMs);
			drm_intel_gem_bo_clear_relocs((drm_intel_bo*)m_OsData, 0);
			if (result) {
				//translate the drm ecode (-ETIME).
				result = CM_EXCEED_MAX_TIMEOUT;
				break;
			}
		}

		Query();
	}

	m_pQueue->ReleaseQueueLock();
	return result;
}
Beispiel #2
0
void
intel_batchbuffer_reset_to_saved(struct intel_context *intel)
{
   drm_intel_gem_bo_clear_relocs(intel->batch.bo, intel->batch.saved.reloc_count);

   intel->batch.used = intel->batch.saved.used;

   /* Cached batch state is dead, since we just cleared some unknown part of the
    * batchbuffer.  Assume that the caller resets any other state necessary.
    */
   clear_cache(intel);
}
Beispiel #3
0
static void intel_next_batch(ScrnInfoPtr scrn, int mode)
{
	intel_screen_private *intel = intel_get_screen_private(scrn);
	dri_bo *tmp;

	drm_intel_gem_bo_clear_relocs(intel->batch_bo, 0);

	tmp = intel->last_batch_bo[mode];
	intel->last_batch_bo[mode] = intel->batch_bo;
	intel->batch_bo = tmp;

	intel->batch_used = 0;

	/* We don't know when another client has executed, so we have
	 * to reinitialize our 3D state per batch.
	 */
	intel->last_3d = LAST_3D_OTHER;
}
Beispiel #4
0
void
intel_bo_truncate_relocs(struct intel_bo *bo, int start)
{
   drm_intel_gem_bo_clear_relocs(gem_bo(bo), start);
}