diff options
author | Connor Abbott <[email protected]> | 2017-06-06 16:40:26 -0700 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-09-08 04:12:49 +0100 |
commit | b8a51c8c4bc9b8d36bda2083bffeaa044f5aaad4 (patch) | |
tree | 3271ab77e73673403931e3425be95d971b82840a /src/gallium/drivers | |
parent | bd73b89792eaed7ccdb07f925f7fa70064670c96 (diff) |
radeonsi: move the guts of ARB_shader_group_vote emission to ac
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index ffc0d8d9b1b..e7888e6012b 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3821,13 +3821,8 @@ static void vote_all_emit( { struct si_shader_context *ctx = si_shader_context(bld_base); struct gallivm_state *gallivm = &ctx->gallivm; - LLVMValueRef active_set, vote_set; - LLVMValueRef tmp; - - active_set = ac_build_ballot(&ctx->ac, ctx->i32_1); - vote_set = ac_build_ballot(&ctx->ac, emit_data->args[0]); - tmp = LLVMBuildICmp(gallivm->builder, LLVMIntEQ, vote_set, active_set, ""); + LLVMValueRef tmp = ac_build_vote_all(&ctx->ac, emit_data->args[0]); emit_data->output[emit_data->chan] = LLVMBuildSExt(gallivm->builder, tmp, ctx->i32, ""); } @@ -3839,13 +3834,8 @@ static void vote_any_emit( { struct si_shader_context *ctx = si_shader_context(bld_base); struct gallivm_state *gallivm = &ctx->gallivm; - LLVMValueRef vote_set; - LLVMValueRef tmp; - vote_set = ac_build_ballot(&ctx->ac, emit_data->args[0]); - - tmp = LLVMBuildICmp(gallivm->builder, LLVMIntNE, - vote_set, LLVMConstInt(ctx->i64, 0, 0), ""); + LLVMValueRef tmp = ac_build_vote_any(&ctx->ac, emit_data->args[0]); emit_data->output[emit_data->chan] = LLVMBuildSExt(gallivm->builder, tmp, ctx->i32, ""); } @@ -3857,16 +3847,8 @@ static void vote_eq_emit( { struct si_shader_context *ctx = si_shader_context(bld_base); struct gallivm_state *gallivm = &ctx->gallivm; - LLVMValueRef active_set, vote_set; - LLVMValueRef all, none, tmp; - - active_set = ac_build_ballot(&ctx->ac, ctx->i32_1); - vote_set = ac_build_ballot(&ctx->ac, emit_data->args[0]); - all = LLVMBuildICmp(gallivm->builder, LLVMIntEQ, vote_set, active_set, ""); - none = LLVMBuildICmp(gallivm->builder, LLVMIntEQ, - vote_set, LLVMConstInt(ctx->i64, 0, 0), ""); - tmp = LLVMBuildOr(gallivm->builder, all, none, ""); + LLVMValueRef tmp = ac_build_vote_eq(&ctx->ac, emit_data->args[0]); emit_data->output[emit_data->chan] = LLVMBuildSExt(gallivm->builder, tmp, ctx->i32, ""); } |