summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_regions.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-05-24 16:55:06 -0700
committerEric Anholt <eric@anholt.net>2007-05-24 16:55:06 -0700
commitb9323aa2cb4563fba1b328dbc802d673449056ac (patch)
treea2711a7b2152971311607ef72186c86b244e3738 /src/mesa/drivers/dri/i915tex/intel_regions.c
parentfd9d27e0686f5a15803d13d207e58be1972fdf31 (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/intel_regions.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_regions.c14
1 files changed, 4 insertions, 10 deletions
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