From 9b461d4d029497dd6f71e60220849e1b66bb8cf5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 16 Nov 2007 16:14:42 -0800 Subject: [PATCH] [i915] Pass static region names in so debugging says more than "static region". --- src/mesa/drivers/dri/intel/intel_regions.c | 14 ++++++++------ src/mesa/drivers/dri/intel/intel_regions.h | 2 ++ src/mesa/drivers/dri/intel/intel_screen.c | 13 +++++++------ 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 7799fdbb116..009e8a3e3e2 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 42d7b177117..77bb6916d16 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 35dff8c565c..0a118c742b7 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); -- 2.30.2