[Mesa-dev] [PATCH 02/12] gallium/radeon: page alignment for buffers is unnecessary

Nicolai Hähnle nhaehnle at gmail.com
Fri Sep 9 17:34:04 UTC 2016


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

In some places (e.g. shader program pointers) we require 256 bytes alignment.
---
 src/gallium/drivers/radeon/r600_pipe_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 6d7cc1b..6fe3183 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1077,22 +1077,21 @@ static void r600_query_memory_info(struct pipe_screen *screen,
 		/* Just return the number of evicted 64KB pages. */
 		info->nr_device_memory_evictions = info->device_memory_evicted / 64;
 }
 
 struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen,
 						  const struct pipe_resource *templ)
 {
 	struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
 
 	if (templ->target == PIPE_BUFFER) {
-		return r600_buffer_create(screen, templ,
-					  rscreen->info.gart_page_size);
+		return r600_buffer_create(screen, templ, 256);
 	} else {
 		return r600_texture_create(screen, templ);
 	}
 }
 
 bool r600_common_screen_init(struct r600_common_screen *rscreen,
 			     struct radeon_winsys *ws)
 {
 	char llvm_string[32] = {}, kernel_version[128] = {};
 	struct utsname uname_data;
-- 
2.7.4



More information about the mesa-dev mailing list