[Mesa-dev] [PATCH] radeonsi: set correct usage flag according to image access type
Marek Olšák
maraeo at gmail.com
Tue Jun 20 10:36:56 UTC 2017
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, Jun 20, 2017 at 10:24 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/drivers/radeonsi/si_descriptors.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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
> --
> 2.13.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list