[Mesa-dev] [PATCH] ac/nir: add ARB_shader_group_vote support

Nicolai Hähnle nhaehnle at gmail.com
Mon Jan 22 12:41:38 UTC 2018


Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


On 22.01.2018 00:52, Timothy Arceri wrote:
> ---
>   src/amd/common/ac_nir_to_llvm.c | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index ac3a949bd3..eabdc83f16 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -4454,6 +4454,21 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
>   	case nir_intrinsic_load_patch_vertices_in:
>   		result = ctx->abi->load_patch_vertices_in(ctx->abi);
>   		break;
> +	case nir_intrinsic_vote_all: {
> +		LLVMValueRef tmp = ac_build_vote_all(&ctx->ac, get_src(ctx, instr->src[0]));
> +		result = LLVMBuildSExt(ctx->ac.builder, tmp, ctx->ac.i32, "");
> +		break;
> +	}
> +	case nir_intrinsic_vote_any: {
> +		LLVMValueRef tmp = ac_build_vote_any(&ctx->ac, get_src(ctx, instr->src[0]));
> +		result = LLVMBuildSExt(ctx->ac.builder, tmp, ctx->ac.i32, "");
> +		break;
> +	}
> +	case nir_intrinsic_vote_eq: {
> +		LLVMValueRef tmp = ac_build_vote_eq(&ctx->ac, get_src(ctx, instr->src[0]));
> +		result = LLVMBuildSExt(ctx->ac.builder, tmp, ctx->ac.i32, "");
> +		break;
> +	}
>   	default:
>   		fprintf(stderr, "Unknown intrinsic: ");
>   		nir_print_instr(&instr->instr, stderr);
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list