Module: Mesa
Branch: master
Commit: 72e9a2344346f4e2eff240e475463eeb046fe9be
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=72e9a2344346f4e2eff240e475463eeb046fe9be

Author: Rhys Perry <[email protected]>
Date:   Fri Nov 15 12:42:46 2019 +0000

radv/aco: use ACO for GS copy shaders

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2421>

---

 src/amd/vulkan/radv_pipeline.c | 3 ++-
 src/amd/vulkan/radv_shader.c   | 5 +++--
 src/amd/vulkan/radv_shader.h   | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 71ffa1b47ec..62244902a47 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2881,7 +2881,8 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
                        pipeline->gs_copy_shader = radv_create_gs_copy_shader(
                                        device, nir[MESA_SHADER_GEOMETRY], 
&info,
                                        &gs_copy_binary, keep_executable_info,
-                                       
keys[MESA_SHADER_GEOMETRY].has_multiview_view_index);
+                                       
keys[MESA_SHADER_GEOMETRY].has_multiview_view_index,
+                                       use_aco);
                }
 
                if (!keep_executable_info && pipeline->gs_copy_shader) {
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 7eea501fbd3..dc9b91ff922 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1214,14 +1214,15 @@ radv_create_gs_copy_shader(struct radv_device *device,
                           struct radv_shader_info *info,
                           struct radv_shader_binary **binary_out,
                           bool keep_shader_info,
-                          bool multiview)
+                          bool multiview, bool use_aco)
 {
        struct radv_nir_compiler_options options = {0};
 
+       options.explicit_scratch_args = use_aco;
        options.key.has_multiview_view_index = multiview;
 
        return shader_variant_compile(device, NULL, &shader, 1, 
MESA_SHADER_VERTEX,
-                                     info, &options, true, keep_shader_info, 
false, binary_out);
+                                     info, &options, true, keep_shader_info, 
use_aco, binary_out);
 }
 
 void
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index 9544f17d461..3001f494cef 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -442,7 +442,8 @@ struct radv_shader_variant *
 radv_create_gs_copy_shader(struct radv_device *device, struct nir_shader *nir,
                           struct radv_shader_info *info,
                           struct radv_shader_binary **binary_out,
-                          bool multiview,  bool keep_shader_info);
+                          bool multiview,  bool keep_shader_info,
+                          bool use_aco);
 
 void
 radv_shader_variant_destroy(struct radv_device *device,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to