mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 16:02:37 +00:00
shader: branch to the pixel kill on the inverted targets instead of negating the condition
This commit is contained in:
1 parent
6ee2ef8715
commit
8177969f33
1 file changed
+1
-3
@@ -16,10 +16,8 @@ namespace {
|
||||
void EmitKillIfBoolFalse(EmitterState& state, uint32_t active) {
|
||||
const auto kill_label = state.builder.AllocateId();
|
||||
const auto merge_label = state.builder.AllocateId();
|
||||
const auto inactive = state.builder.AllocateId();
|
||||
state.builder.AddFunction(spv::OpLogicalNot, TypeBool(state), inactive, active);
|
||||
state.builder.AddFunction(spv::OpSelectionMerge, merge_label, spv::SelectionControlMaskNone);
|
||||
state.builder.AddFunction(spv::OpBranchConditional, inactive, kill_label, merge_label);
|
||||
state.builder.AddFunction(spv::OpBranchConditional, active, merge_label, kill_label);
|
||||
EmitLabel(state, kill_label);
|
||||
state.builder.AddFunction(spv::OpKill);
|
||||
EmitLabel(state, merge_label);
|
||||
|
||||
Reference in new issue
Block a user