radeonsi: re-use 'desc' in si_set_shader_image()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Apr 2017 22:07:31 +0000 (00:07 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 10 Apr 2017 21:05:27 +0000 (23:05 +0200)
No need to compute the offset in the descriptor twice.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c

index 8f5a16b..703a7cb 100644 (file)
@@ -749,8 +749,7 @@ static void si_set_shader_image(struct si_context *ctx,
                si_make_buffer_descriptor(screen, res,
                                          view->format,
                                          view->u.buf.offset,
-                                         view->u.buf.size,
-                                         descs->list + slot * 8);
+                                         view->u.buf.size, desc);
                si_set_buf_desc_address(res, view->u.buf.offset, desc + 4);
 
                images->compressed_colortex_mask &= ~(1 << slot);