diff options
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |