GPU: Discard data when getting texture before full clear (#5719)

* GPU: Discard data when getting texture before full clear

* Fix rules and order of clear checks

* Fix formatting
This commit is contained in:
riperiperi
2023-09-25 22:07:03 +01:00
committed by GitHub
parent 8026e1c804
commit f6c3f1cdfd
10 changed files with 205 additions and 11 deletions

View File

@@ -447,6 +447,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
bool useControl = updateFlags.HasFlag(RenderTargetUpdateFlags.UseControl);
bool layered = updateFlags.HasFlag(RenderTargetUpdateFlags.Layered);
bool singleColor = updateFlags.HasFlag(RenderTargetUpdateFlags.SingleColor);
bool discard = updateFlags.HasFlag(RenderTargetUpdateFlags.DiscardClip);
int count = useControl ? rtControl.UnpackCount() : Constants.TotalRenderTargets;
@@ -486,6 +487,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
memoryManager,
colorState,
_vtgWritesRtLayer || layered,
discard,
samplesInX,
samplesInY,
sizeHint);
@@ -525,6 +527,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
dsState,
dsSize,
_vtgWritesRtLayer || layered,
discard,
samplesInX,
samplesInY,
sizeHint);