aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-04-01 06:56:46 +1000
committerDave Airlie <[email protected]>2017-04-01 07:14:38 +1000
commita58d03a5a210098e6cd8bd3559538cf21a4b6d23 (patch)
tree098e0bbf28949b22fd6ec622a7a4e565c0727e55
parent744317c9d2973cebe64ca91899815d6c1515b7f5 (diff)
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 <[email protected]>
-rw-r--r--src/amd/common/ac_nir_to_llvm.c3
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;
}