[Mesa-dev] [PATCH 2/3] gallium/radeon: remove use_reusable_pool parameter from r600_init_resource

Nicolai Hähnle nhaehnle at gmail.com
Sat Apr 23 04:01:23 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

All callers set it to true.
---
 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 abc41e0..7386f9f 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2744,7 +2744,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 ab5eab9..1955dab 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;
@@ -493,7 +492,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 44ab675..ba7a414 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 4bbe04d..d6719ef 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 798deb6..0b32045 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:
-- 
2.5.0



More information about the mesa-dev mailing list