[Mesa-dev] [PATCH 4/6] r600/ssbo: use r32ui format for ssbo resources.

Dave Airlie airlied at gmail.com
Tue Dec 5 10:35:50 UTC 2017


From: Dave Airlie <airlied at redhat.com>

This works best for returning the correct values and sizes in
tests.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/r600/evergreen_state.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 89b6c3bb88..12662c831b 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3948,12 +3948,12 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
 
 		resource = (struct r600_resource *)rview->base.resource;
 
-		evergreen_setup_immed_buffer(rctx, rview, resource->b.b.format);
+		evergreen_setup_immed_buffer(rctx, rview, PIPE_FORMAT_R32_UINT);
 
 		color.offset = 0;
 		color.view = 0;
 		evergreen_set_color_surface_buffer(rctx, resource,
-						   PIPE_FORMAT_R32_FLOAT,
+						   PIPE_FORMAT_R32_UINT,
 						   buf->buffer_offset,
 						   buf->buffer_offset + buf->buffer_size,
 						   &color);
@@ -3973,7 +3973,7 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
 		rview->cb_color_fmask_slice = color.fmask_slice;
 
 		memset(&buf_params, 0, sizeof(buf_params));
-		buf_params.pipe_format = PIPE_FORMAT_R32_FLOAT;
+		buf_params.pipe_format = PIPE_FORMAT_R32_UINT;
 		buf_params.offset = buf->buffer_offset;
 		buf_params.size = buf->buffer_size;
 		buf_params.swizzle[0] = PIPE_SWIZZLE_X;
-- 
2.14.3



More information about the mesa-dev mailing list