[Mesa-dev] [PATCH] radv: set ACCESS_NON_READABLE on stores for copy/fill/clear meta shaders
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Apr 15 19:25:02 UTC 2019
r-b
On Mon, Apr 15, 2019 at 6:38 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> The compiler will emit GLC=1.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_meta_buffer.c | 2 ++
> src/amd/vulkan/radv_meta_clear.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
> index b3aed109a5e..3e4f63ad3c1 100644
> --- a/src/amd/vulkan/radv_meta_buffer.c
> +++ b/src/amd/vulkan/radv_meta_buffer.c
> @@ -51,6 +51,7 @@ build_buffer_fill_shader(struct radv_device *dev)
> store->src[1] = nir_src_for_ssa(&dst_buf->dest.ssa);
> store->src[2] = nir_src_for_ssa(offset);
> nir_intrinsic_set_write_mask(store, 0xf);
> + nir_intrinsic_set_access(store, ACCESS_NON_READABLE);
> store->num_components = 4;
> nir_builder_instr_insert(&b, &store->instr);
>
> @@ -110,6 +111,7 @@ build_buffer_copy_shader(struct radv_device *dev)
> store->src[1] = nir_src_for_ssa(&dst_buf->dest.ssa);
> store->src[2] = nir_src_for_ssa(offset);
> nir_intrinsic_set_write_mask(store, 0xf);
> + nir_intrinsic_set_access(store, ACCESS_NON_READABLE);
> store->num_components = 4;
> nir_builder_instr_insert(&b, &store->instr);
>
> diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
> index 4407bd75ee9..101ef4344f4 100644
> --- a/src/amd/vulkan/radv_meta_clear.c
> +++ b/src/amd/vulkan/radv_meta_clear.c
> @@ -1114,6 +1114,7 @@ build_clear_htile_mask_shader()
> store->src[1] = nir_src_for_ssa(&buf->dest.ssa);
> store->src[2] = nir_src_for_ssa(offset);
> nir_intrinsic_set_write_mask(store, 0xf);
> + nir_intrinsic_set_access(store, ACCESS_NON_READABLE);
> store->num_components = 4;
> nir_builder_instr_insert(&b, &store->instr);
>
> --
> 2.21.0
>
> _______________________________________________
> 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