From: Samuel Pitoiset Date: Thu, 30 Aug 2018 08:30:54 +0000 (+0200) Subject: radv: adjust the cull dist mask in scan_shader_output_decl() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6a6441c758299d8a0d17289e4bdb78980ac5f5a;p=mesa.git radv: adjust the cull dist mask in scan_shader_output_decl() 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 0c7b238e108..069fb53b688 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -2248,10 +2248,12 @@ scan_shader_output_decl(struct radv_shader_context *ctx, if (stage == MESA_SHADER_VERTEX) { 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; } if (stage == MESA_SHADER_TESS_EVAL) { ctx->shader_info->tes.outinfo.clip_dist_mask = (1 << shader->info.clip_distance_array_size) - 1; 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 (length > 4) @@ -2496,9 +2498,6 @@ handle_vs_outputs_post(struct radv_shader_context *ctx, length = util_last_bit(output_usage_mask); - if (outinfo->cull_dist_mask) - outinfo->cull_dist_mask <<= ctx->num_output_clips; - i = VARYING_SLOT_CLIP_DIST0; for (j = 0; j < length; j++) slots[j] = ac_to_float(&ctx->ac, radv_load_output(ctx, i, j));