diff --git a/src/SharpEmu.Libs/Gpu/Images/ImageRequestBuilders.DepthTarget.cs b/src/SharpEmu.Libs/Gpu/Images/ImageRequestBuilders.DepthTarget.cs index 4c8b467..8a0c357 100644 --- a/src/SharpEmu.Libs/Gpu/Images/ImageRequestBuilders.DepthTarget.cs +++ b/src/SharpEmu.Libs/Gpu/Images/ImageRequestBuilders.DepthTarget.cs @@ -58,9 +58,6 @@ public static partial class ImageRequestBuilders return Format.Undefined; } - private static bool HtileStencilCompatible(bool hasStencil, bool hasHtile, bool htileStencilDisabled) => - !hasStencil || htileStencilDisabled || hasHtile; - // Builds the request for the bound depth target. Null when no depth or stencil state is active. public static DepthTargetResolution? DepthTarget(in DepthTargetWords depthWords, IImageFormatSupport device) => DepthTargetCore(in depthWords, device, copyMode: false, writeBuffer: false); @@ -128,7 +125,7 @@ public static partial class ImageRequestBuilders if (hasStencil) { - if (depthWords.StencilFormat != GuestStencilFormat.Stencil8UInt || !HtileStencilCompatible(hasStencil, hasHtile, depthWords.HtileStencilDisabled) || + if (depthWords.StencilFormat != GuestStencilFormat.Stencil8UInt || stencilAddress == 0 || (!copyMode && !depthWords.StencilWriteDisabled && depthWords.StencilWriteBase != depthWords.StencilReadBase) || (stencilAddress & 0xFFFF) != 0) { throw SubmissionScheduler.Fatal(