diff options
author | Marek Olšák <[email protected]> | 2017-10-04 05:07:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-24 14:56:34 +0200 |
commit | 2a414c39619320c44e4d0f8f7a7609598081e2b2 (patch) | |
tree | 2ac67cd6bd4fdc47a5301dd8575520950610344f /src/gallium | |
parent | da0083f1237cb89bc818be99dd0717b7e76b6248 (diff) |
radeonsi: postponed KILL isn't postponed anymore, but maintains WQM
This restores performance for the drirc workaround, i.e.
KILL_IF does:
visible = src0 >= 0;
kill_flag &= visible; // accumulate kills
amdgcn_kill(wqm_vote(visible)); // kill fully dead quads only
And all helper pixels are killed at the end of the shader:
amdgcn_kill(kill_flag);
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c index 283a889d847..913b6c32959 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c @@ -69,6 +69,12 @@ static void kil_emit(const struct lp_build_tgsi_action *action, } if (ctx->shader->selector->force_correct_derivs_after_kill) { + /* LLVM 6.0 can kill immediately while maintaining WQM. */ + if (HAVE_LLVM >= 0x0600) { + ac_build_kill_if_false(&ctx->ac, + ac_build_wqm_vote(&ctx->ac, visible)); + } + LLVMValueRef mask = LLVMBuildLoad(builder, ctx->postponed_kill, ""); mask = LLVMBuildAnd(builder, mask, visible, ""); LLVMBuildStore(builder, mask, ctx->postponed_kill); |