From: Dave Airlie Date: Fri, 31 Mar 2017 20:56:46 +0000 (+1000) Subject: radv: fixup geometry clip emission since using the geom pass X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a58d03a5a210098e6cd8bd3559538cf21a4b6d23;p=mesa.git radv: fixup geometry clip emission since using the geom pass Fixes: 2b35b60d: radv: move to using nir clip/cull merge pass. Signed-off-by: Dave Airlie --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index d0cb411f7cd..91e2a1afbb5 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4887,7 +4887,8 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm, ralloc_free(ctx.phis); if (nir->stage == MESA_SHADER_GEOMETRY) { - shader_info->gs.gsvs_vertex_size = util_bitcount64(ctx.output_mask) * 16; + unsigned addclip = ctx.num_output_clips + ctx.num_output_culls > 4; + shader_info->gs.gsvs_vertex_size = (util_bitcount64(ctx.output_mask) + addclip) * 16; shader_info->gs.max_gsvs_emit_size = shader_info->gs.gsvs_vertex_size * nir->info->gs.vertices_out; }