summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_regions.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-09-27 10:16:04 -0700
committerEric Anholt <[email protected]>2007-09-27 11:15:51 -0700
commitb2f1aa2389473ed09170713301b042661d70a48e (patch)
treebc2ebb05bac735741accb83983c83d5e943bb323 /src/mesa/drivers/dri/i965/intel_regions.c
parent38c30a81844214b030c9c637f9cf97bd2bf19cde (diff)
WIP 965 conversion to dri_bufmgr.
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_regions.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_regions.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_regions.c b/src/mesa/drivers/dri/i965/intel_regions.c
index b78eba898ff..9bf858cacb4 100644
--- a/src/mesa/drivers/dri/i965/intel_regions.c
+++ b/src/mesa/drivers/dri/i965/intel_regions.c
@@ -42,7 +42,7 @@
#include "intel_context.h"
#include "intel_regions.h"
#include "intel_blit.h"
-#include "bufmgr.h"
+#include "dri_bufmgr.h"
#include "imports.h"
/* XXX: Thread safety?
@@ -51,7 +51,7 @@ GLubyte *intel_region_map(struct intel_context *intel, struct intel_region *regi
{
DBG("%s\n", __FUNCTION__);
if (!region->map_refcount++) {
- region->map = bmMapBuffer(intel, region->buffer, 0);
+ region->map = dri_bo_map(region->buffer, GL_TRUE);
if (!region->map)
region->map_refcount--;
}
@@ -64,7 +64,7 @@ void intel_region_unmap(struct intel_context *intel,
{
DBG("%s\n", __FUNCTION__);
if (!--region->map_refcount) {
- bmUnmapBuffer(intel, region->buffer);
+ dri_bo_unmap(region->buffer);
region->map = NULL;
}
}
@@ -84,8 +84,8 @@ struct intel_region *intel_region_alloc( struct intel_context *intel,
region->height = height; /* needed? */
region->refcount = 1;
- bmGenBuffers(intel, "tex", 1, &region->buffer, 6);
- bmBufferData(intel, region->buffer, pitch * cpp * height, NULL, 0);
+ region->buffer = dri_bo_alloc(intelScreen->bufmgr, "region",
+ pitch * cpp * height, 64, DRM_BO_FLAG_MEM_TT);
return region;
}
@@ -108,7 +108,7 @@ void intel_region_release( struct intel_context *intel,
if (--(*region)->refcount == 0) {
assert((*region)->map_refcount == 0);
- bmDeleteBuffers(intel, 1, &(*region)->buffer);
+ dri_bo_unreference((*region)->buffer);
free(*region);
}
*region = NULL;