[Vulkan] Fix stencil bit transfer shaders not discarding pixels
"packed" was never set because source_depth_texture isn't created for stencil bit output. This caused the discard logic to be skipped resulting in stencil being incorrectly incremented on every transfer draw until it saturated at 0xFF. Fixes many remaining Vulkan rendering issues, e.g. Brothers, Orange Box, Arkham Origins, many others.
This commit is contained in:
@@ -3741,6 +3741,10 @@ VkShaderModule VulkanRenderTargetCache::GetTransferShader(
|
||||
}
|
||||
}
|
||||
}
|
||||
// For stencil bit output, use stencil directly for the discard check.
|
||||
if (packed == spv::NoResult && mode.output == TransferOutput::kStencilBit) {
|
||||
packed = source_stencil[0];
|
||||
}
|
||||
switch (mode.output) {
|
||||
case TransferOutput::kColor: {
|
||||
// Unless a special path was taken, unpack the raw 32bpp value into the
|
||||
|
||||
Reference in New Issue
Block a user