[Mesa-dev] [PATCH] radv: fixup geometry clip emission since using the geom pass

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Mar 31 21:10:40 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Fri, Mar 31, 2017 at 10:58 PM, Dave Airlie <airlied at gmail.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list