diff options
author | Dave Airlie <[email protected]> | 2007-11-01 10:41:27 +1100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2007-11-01 10:41:39 +1100 |
commit | 1b880c7e3c216a4f5417aacb702e5a0124d12110 (patch) | |
tree | 8448ce2a55ed9f1dd3a4f152c46e704d2051a89e /src/mesa/drivers | |
parent | dbcd20f1c21f44a72d5386faa63b788b3c79cea2 (diff) |
i915: make i915 use the cached mappings for batch/buffer objects.
This should restore gears speed on 9xx hardware
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_bufmgr.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_batchbuffer.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_buffer_objects.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.c b/src/mesa/drivers/dri/common/dri_bufmgr.c index 83886480dd3..72a4a171500 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr.c +++ b/src/mesa/drivers/dri/common/dri_bufmgr.c @@ -40,9 +40,8 @@ dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size, assert((location_mask & ~(DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_PRIV0 | DRM_BO_FLAG_MEM_PRIV1 | DRM_BO_FLAG_MEM_PRIV2 | - DRM_BO_FLAG_MEM_PRIV3 | - DRM_BO_FLAG_MEM_PRIV4)) == 0); - + DRM_BO_FLAG_MEM_PRIV3 | DRM_BO_FLAG_MEM_PRIV4 | + DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED)) == 0); return bufmgr->bo_alloc(bufmgr, name, size, alignment, location_mask); } diff --git a/src/mesa/drivers/dri/i915/intel_batchbuffer.c b/src/mesa/drivers/dri/i915/intel_batchbuffer.c index 74c75a3769b..8ece6d2760c 100644 --- a/src/mesa/drivers/dri/i915/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i915/intel_batchbuffer.c @@ -80,7 +80,7 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch) batch->buf = dri_bo_alloc(intel->intelScreen->bufmgr, "batchbuffer", intel->intelScreen->maxBatchSize, 4096, - DRM_BO_FLAG_MEM_TT); + DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED); dri_bo_map(batch->buf, GL_TRUE); batch->map = batch->buf->virtual; batch->size = intel->intelScreen->maxBatchSize; diff --git a/src/mesa/drivers/dri/i915/intel_buffer_objects.c b/src/mesa/drivers/dri/i915/intel_buffer_objects.c index 3c73c402d96..5348822816c 100644 --- a/src/mesa/drivers/dri/i915/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i915/intel_buffer_objects.c @@ -42,7 +42,7 @@ intel_bufferobj_alloc_buffer(struct intel_context *intel, { intel_obj->buffer = dri_bo_alloc(intel->intelScreen->bufmgr, "bufferobj", intel_obj->Base.Size, 64, - DRM_BO_FLAG_MEM_TT); + DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED); } /** |