From: Samuel Pitoiset Date: Tue, 16 Jul 2019 06:37:32 +0000 (+0200) Subject: radv: fix gathering clip/cull distance masks for GS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b2bfeaaaacbc8a0fbab1e7221d1f2e0ae2a7017;p=mesa.git radv: fix gathering clip/cull distance masks for GS For NGG, the driver relies on the VS outinfo struct. This fixes dEQP-VK.clipping.user_defined.clip_*_vert_tess_geom_* Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 7573292f5c8..aa50b91d8c0 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -2407,6 +2407,11 @@ scan_shader_output_decl(struct radv_shader_context *ctx, ctx->shader_info->tes.outinfo.cull_dist_mask = (1 << shader->info.cull_distance_array_size) - 1; ctx->shader_info->tes.outinfo.cull_dist_mask <<= shader->info.clip_distance_array_size; } + if (stage == MESA_SHADER_GEOMETRY) { + ctx->shader_info->vs.outinfo.clip_dist_mask = (1 << shader->info.clip_distance_array_size) - 1; + ctx->shader_info->vs.outinfo.cull_dist_mask = (1 << shader->info.cull_distance_array_size) - 1; + ctx->shader_info->vs.outinfo.cull_dist_mask <<= shader->info.clip_distance_array_size; + } } }