summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-20 10:24:18 +0200
committerSamuel Pitoiset <[email protected]>2017-06-20 13:01:18 +0200
commitea2492b62f6837184ca66d33d6e664e3a0a67c35 (patch)
treeed3d12760e611c304d06f19c2898c2b1f516a1fc
parent58af1f6bb074168669aaec2755c7f369a8b58d62 (diff)
radeonsi: set correct usage flag according to image access type
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 1e92a70dc7c..a7031ec3632 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -867,7 +867,9 @@ static void si_set_shader_image(struct si_context *ctx,
/* Since this can flush, it must be done after enabled_mask is updated. */
si_sampler_view_add_buffer(ctx, &res->b.b,
- RADEON_USAGE_READWRITE, false, true);
+ (view->access & PIPE_IMAGE_ACCESS_WRITE) ?
+ RADEON_USAGE_READWRITE : RADEON_USAGE_READ,
+ false, true);
}
static void