Mesa (master): gallium/radeon: remove use_reusable_pool parameter from r600_init_resource

Nicolai Hähnle nh at kemper.freedesktop.org
Wed Apr 27 16:16:55 UTC 2016


Module: Mesa
Branch: master
Commit: 13acf2b24375af40b62571d5f07c75342c1acb14
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13acf2b24375af40b62571d5f07c75342c1acb14

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Fri Apr 22 22:56:13 2016 -0500

gallium/radeon: remove use_reusable_pool parameter from r600_init_resource

All callers set it to true.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/r600/r600_state_common.c    | 2 +-
 src/gallium/drivers/radeon/r600_buffer_common.c | 7 +++----
 src/gallium/drivers/radeon/r600_pipe_common.h   | 3 +--
 src/gallium/drivers/radeon/r600_texture.c       | 2 +-
 src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
 5 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 2ab9f92..5317de0 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2788,7 +2788,7 @@ static void r600_invalidate_buffer(struct pipe_context *ctx, struct pipe_resourc
 
 	/* Reallocate the buffer in the same pipe_resource. */
 	r600_init_resource(&rctx->screen->b, rbuffer, rbuffer->b.b.width0,
-			   alignment, TRUE);
+			   alignment);
 
 	/* We changed the buffer, now we need to bind it where the old one was bound. */
 	/* Vertex buffers. */
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 664dc5b..1d40b76 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -102,8 +102,7 @@ void *r600_buffer_map_sync_with_rings(struct r600_common_context *ctx,
 
 bool r600_init_resource(struct r600_common_screen *rscreen,
 			struct r600_resource *res,
-			uint64_t size, unsigned alignment,
-			bool use_reusable_pool)
+			uint64_t size, unsigned alignment)
 {
 	struct r600_texture *rtex = (struct r600_texture*)res;
 	struct pb_buffer *old_buf, *new_buf;
@@ -177,7 +176,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
 
 	/* Allocate a new resource. */
 	new_buf = rscreen->ws->buffer_create(rscreen->ws, size, alignment,
-					     use_reusable_pool,
+					     true,
 					     res->domains, flags);
 	if (!new_buf) {
 		return false;
@@ -489,7 +488,7 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
 	struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
 	struct r600_resource *rbuffer = r600_alloc_buffer_struct(screen, templ);
 
-	if (!r600_init_resource(rscreen, rbuffer, templ->width0, alignment, TRUE)) {
+	if (!r600_init_resource(rscreen, rbuffer, templ->width0, alignment)) {
 		FREE(rbuffer);
 		return NULL;
 	}
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index a0cc162..d7478ef 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -549,8 +549,7 @@ void *r600_buffer_map_sync_with_rings(struct r600_common_context *ctx,
                                       unsigned usage);
 bool r600_init_resource(struct r600_common_screen *rscreen,
 			struct r600_resource *res,
-			uint64_t size, unsigned alignment,
-			bool use_reusable_pool);
+			uint64_t size, unsigned alignment);
 struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
 					 const struct pipe_resource *templ,
 					 unsigned alignment);
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 2d4ae33..7e58490 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -878,7 +878,7 @@ r600_texture_create_object(struct pipe_screen *screen,
 	/* Now create the backing buffer. */
 	if (!buf) {
 		if (!r600_init_resource(rscreen, resource, rtex->size,
-					rtex->surface.bo_alignment, TRUE)) {
+					rtex->surface.bo_alignment)) {
 			FREE(rtex);
 			return NULL;
 		}
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 6926c6b..fbaf804 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1203,7 +1203,7 @@ static void si_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource
 
 	/* Reallocate the buffer in the same pipe_resource. */
 	r600_init_resource(&sctx->screen->b, rbuffer, rbuffer->b.b.width0,
-			   alignment, TRUE);
+			   alignment);
 
 	/* We changed the buffer, now we need to bind it where the old one
 	 * was bound. This consists of 2 things:




More information about the mesa-commit mailing list