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

Author: Samuel Pitoiset <[email protected]>
Date:   Mon May 14 16:04:36 2018 +0200

radv: reduce the number of parameters export by the GS copy shader

By using the geometry shader output usage mask.

This improves all Vulkan demos that use a geometry shader
(ie. geometryshader, deferredshadows, viewportarray).

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>

---

 src/amd/vulkan/radv_nir_to_llvm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c
index 2162ca58e0..b4af0f2941 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2493,10 +2493,9 @@ handle_vs_outputs_post(struct radv_shader_context *ctx,
                        output_usage_mask =
                                ctx->shader_info->info.tes.output_usage_mask[i];
                } else {
-                       /* Enable all channels for the GS copy shader because
-                        * we don't know the output usage mask currently.
-                        */
-                       output_usage_mask = 0xf;
+                       assert(ctx->is_gs_copy_shader);
+                       output_usage_mask =
+                               ctx->shader_info->info.gs.output_usage_mask[i];
                }
 
                radv_export_param(ctx, param_count, values, output_usage_mask);

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

Reply via email to