summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-11-16 16:14:42 -0800
committerEric Anholt <eric@anholt.net>2007-11-16 16:18:30 -0800
commit9b461d4d029497dd6f71e60220849e1b66bb8cf5 (patch)
treec3fcb9eb9845530f1bf065c8c45ebea430a4b9d5 /src/mesa
parent5ef6803b7a902e7faa0e77408a43eabc408ff547 (diff)
[i915] Pass static region names in so debugging says more than "static region".
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c14
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c13
3 files changed, 17 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index 7799fdbb11..009e8a3e3e 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -147,6 +147,7 @@ intel_region_release(struct intel_region **region)
struct intel_region *
intel_region_create_static(intelScreenPrivate *intelScreen,
+ const char *name,
GLuint mem_type,
unsigned int bo_handle,
GLuint offset,
@@ -164,11 +165,11 @@ intel_region_create_static(intelScreenPrivate *intelScreen,
if (intelScreen->ttm) {
assert(bo_handle != -1);
region->buffer = intel_ttm_bo_create_from_handle(intelScreen->bufmgr,
- "static region",
- bo_handle);
+ name,
+ bo_handle);
} else {
region->buffer = dri_bo_alloc_static(intelScreen->bufmgr,
- "static region",
+ name,
offset, pitch * cpp * height,
virtual,
DRM_BO_FLAG_MEM_TT);
@@ -182,6 +183,7 @@ intel_region_create_static(intelScreenPrivate *intelScreen,
void
intel_region_update_static(intelScreenPrivate *intelScreen,
struct intel_region *region,
+ const char *name,
GLuint mem_type,
unsigned int bo_handle,
GLuint offset,
@@ -203,11 +205,11 @@ intel_region_update_static(intelScreenPrivate *intelScreen,
if (intelScreen->ttm) {
assert(bo_handle != -1);
region->buffer = intel_ttm_bo_create_from_handle(intelScreen->bufmgr,
- "static region",
- bo_handle);
+ name,
+ bo_handle);
} else {
region->buffer = dri_bo_alloc_static(intelScreen->bufmgr,
- "static region",
+ name,
offset, pitch * cpp * height,
virtual,
DRM_BO_FLAG_MEM_TT);
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index 42d7b17711..77bb6916d1 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -72,6 +72,7 @@ void intel_region_release(struct intel_region **ib);
extern struct intel_region
*intel_region_create_static(intelScreenPrivate *intelScreen,
+ const char *name,
GLuint mem_type,
unsigned int bo_handle,
GLuint offset,
@@ -81,6 +82,7 @@ extern struct intel_region
extern void
intel_region_update_static(intelScreenPrivate *intelScreen,
struct intel_region *region,
+ const char *name,
GLuint mem_type,
unsigned int bo_handle,
GLuint offset,
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 35dff8c565..0a118c742b 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -172,18 +172,19 @@ intel_fence_wait(void *private, unsigned int cookie)
static struct intel_region *
intel_recreate_static(intelScreenPrivate *intelScreen,
+ const char *name,
struct intel_region *region,
intelRegion *region_desc,
GLuint mem_type)
{
if (region) {
- intel_region_update_static(intelScreen, region, mem_type,
+ intel_region_update_static(intelScreen, region, name, mem_type,
region_desc->bo_handle, region_desc->offset,
region_desc->map, intelScreen->cpp,
region_desc->pitch / intelScreen->cpp,
intelScreen->height);
} else {
- region = intel_region_create_static(intelScreen, mem_type,
+ region = intel_region_create_static(intelScreen, name, mem_type,
region_desc->bo_handle,
region_desc->offset,
region_desc->map, intelScreen->cpp,
@@ -211,20 +212,20 @@ static void
intel_recreate_static_regions(intelScreenPrivate *intelScreen)
{
intelScreen->front_region =
- intel_recreate_static(intelScreen,
+ intel_recreate_static(intelScreen, "front",
intelScreen->front_region,
&intelScreen->front,
DRM_BO_FLAG_MEM_TT);
intelScreen->back_region =
- intel_recreate_static(intelScreen,
+ intel_recreate_static(intelScreen, "back",
intelScreen->back_region,
&intelScreen->back,
DRM_BO_FLAG_MEM_TT);
if (intelScreen->third.handle) {
intelScreen->third_region =
- intel_recreate_static(intelScreen,
+ intel_recreate_static(intelScreen, "third",
intelScreen->third_region,
&intelScreen->third,
DRM_BO_FLAG_MEM_TT);
@@ -234,7 +235,7 @@ intel_recreate_static_regions(intelScreenPrivate *intelScreen)
* private buffers.
*/
intelScreen->depth_region =
- intel_recreate_static(intelScreen,
+ intel_recreate_static(intelScreen, "depth",
intelScreen->depth_region,
&intelScreen->depth,
DRM_BO_FLAG_MEM_TT);