From 8177969f339551f439d0e55b967c4efc0429358d Mon Sep 17 00:00:00 2001 From: nmzik Date: Thu, 22 Oct 2026 00:33:07 +0200 Subject: [PATCH] shader: branch to the pixel kill on the inverted targets instead of negating the condition --- .../shader/recompiler/backend/spirv/spirvEmitterProgram.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp b/src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp index 03470687e..cd93c7671 100644 --- a/src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp +++ b/src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp @@ -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);