[Mesa-dev] [PATCH] radv: fixup geometry clip emission since using the geom pass
Dave Airlie
airlied at gmail.com
Fri Mar 31 20:58:56 UTC 2017
From: Dave Airlie <airlied at redhat.com>
Fixes: 2b35b60d: radv: move to using nir clip/cull merge pass.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/common/ac_nir_to_llvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index d188ea6..d405e27 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -5842,7 +5842,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;
} else if (nir->stage == MESA_SHADER_TESS_CTRL) {
--
2.9.3
More information about the mesa-dev
mailing list