[Mesa-dev] [PATCH 1/5] r600g/compute: Fix input buffer size calculation

Tom Stellard tom at stellard.net
Mon Apr 22 20:24:27 PDT 2013


From: Tom Stellard <thomas.stellard at amd.com>

Buffer size should be in bytes not dwords.
---
 src/gallium/drivers/r600/evergreen_compute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 189ffac..58dc36d 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -203,7 +203,7 @@ void evergreen_compute_upload_input(
 		unsigned buffer_size = shader->input_size;
 
 		/* Add space for the grid dimensions */
-		buffer_size += kernel_parameters_offset_bytes * sizeof(uint);
+		buffer_size += kernel_parameters_offset_bytes;
 		shader->kernel_param = r600_compute_buffer_alloc_vram(
 						ctx->screen, buffer_size);
 	}
-- 
1.7.11.4



More information about the mesa-dev mailing list