diff options
author | Eric Anholt <eric@anholt.net> | 2007-05-24 16:55:06 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-05-24 16:55:06 -0700 |
commit | b9323aa2cb4563fba1b328dbc802d673449056ac (patch) | |
tree | a2711a7b2152971311607ef72186c86b244e3738 /src/mesa/drivers/dri/i915tex | |
parent | fd9d27e0686f5a15803d13d207e58be1972fdf31 (diff) |
Replace the flags/hint arguments to bo_alloc{,_static} with a location mask.
Now, allocations only take locations, rather than a variety of unused flags.
The only interesting flag before was the no_move/no_evict pair for scanout
and similar buffers, which the DRI drivers don't use. That will be readded
when we get to using this code for display buffer allocation, by adding a
pin/unpin call (dynamic pinning/unpinning may be useful for VT switching and
root window resizing).
This commit changes one instance of DRM_BO_FLAG_MEM_LOCAL with
DRM_BO_FLAG_MEM_TT, which appeared to have been unintentional.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_batchbuffer.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_buffer_objects.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_regions.c | 14 |
3 files changed, 6 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c index 42ec0ae980..26eecb9440 100644 --- a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c @@ -102,8 +102,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_EXE, 0); + DRM_BO_FLAG_MEM_TT); dri_bo_map(batch->buf, GL_TRUE); batch->map = batch->buf->virtual; batch->size = intel->intelScreen->maxBatchSize; diff --git a/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c b/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c index 6d72ea3fa2..1b95bfd47a 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c @@ -42,8 +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_LOCAL | - DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE, 0); + DRM_BO_FLAG_MEM_TT); } /** diff --git a/src/mesa/drivers/dri/i915tex/intel_regions.c b/src/mesa/drivers/dri/i915tex/intel_regions.c index 9c005c0e5d..e0574ac57b 100644 --- a/src/mesa/drivers/dri/i915tex/intel_regions.c +++ b/src/mesa/drivers/dri/i915tex/intel_regions.c @@ -106,7 +106,7 @@ intel_region_alloc(intelScreenPrivate *intelScreen, region->refcount = 1; region->buffer = dri_bo_alloc(intelScreen->bufmgr, "region", - pitch * cpp * height, 64, 0, 0); + pitch * cpp * height, 64, DRM_BO_FLAG_MEM_TT); return region; } @@ -162,10 +162,7 @@ intel_region_create_static(intelScreenPrivate *intelScreen, /* XXX: questionable flags */ region->buffer = dri_bo_alloc_static(intelScreen->bufmgr, "static region", offset, pitch * cpp * height, virtual, - DRM_BO_FLAG_MEM_TT | - DRM_BO_FLAG_NO_MOVE | - DRM_BO_FLAG_READ | - DRM_BO_FLAG_WRITE, 0); + DRM_BO_FLAG_MEM_TT); return region; } @@ -195,10 +192,7 @@ intel_region_update_static(intelScreenPrivate *intelScreen, /* XXX: questionable flags */ region->buffer = dri_bo_alloc_static(intelScreen->bufmgr, "static region", offset, pitch * cpp * height, virtual, - DRM_BO_FLAG_MEM_TT | - DRM_BO_FLAG_NO_MOVE | - DRM_BO_FLAG_READ | - DRM_BO_FLAG_WRITE, 0); + DRM_BO_FLAG_MEM_TT); } @@ -399,7 +393,7 @@ intel_region_release_pbo(intelScreenPrivate *intelScreen, region->buffer = dri_bo_alloc(intelScreen->bufmgr, "region", region->pitch * region->cpp * region->height, - 64, 0, 0); + 64, DRM_BO_FLAG_MEM_TT); } /* Break the COW tie to the pbo. Both the pbo and the region end up |