radv: set ACCESS_NON_READABLE on stores for copy/fill/clear meta shaders
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 15 Apr 2019 16:41:15 +0000 (18:41 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 15 Apr 2019 19:36:53 +0000 (21:36 +0200)
The compiler will emit GLC=1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_buffer.c
src/amd/vulkan/radv_meta_clear.c

index b3aed109a5e24e68cde2f77e42fefea8ecb74ba8..3e4f63ad3c1d3c9d7c3ecb18c3ff70a2689f03ce 100644 (file)
@@ -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);
 
index 4407bd75ee9a89580b8f0e8868c90568766d2e27..101ef4344f4ae3f86163de156f59208da7186390 100644 (file)
@@ -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);