mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 21:55:47 +00:00
Memory Changes part 2 (ryubing/ryujinx!123)
See merge request ryubing/ryujinx!123
This commit is contained in:
@@ -821,6 +821,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
// on the screen scissor state, then we need to force only one texture to be bound to avoid
|
||||
// host clipping.
|
||||
ScreenScissorState screenScissorState = _state.State.ScreenScissorState;
|
||||
|
||||
Span<ScissorState> scissorStateSpan = _state.State.ScissorState.AsSpan();
|
||||
|
||||
bool clearAffectedByStencilMask = (_state.State.ClearFlags & 1) != 0;
|
||||
bool clearAffectedByScissor = (_state.State.ClearFlags & 0x100) != 0;
|
||||
@@ -831,9 +833,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
|
||||
bool fullClear = screenScissorState.X == 0 && screenScissorState.Y == 0;
|
||||
|
||||
if (fullClear && clearAffectedByScissor && _state.State.ScissorState[0].Enable)
|
||||
if (fullClear && clearAffectedByScissor && scissorStateSpan[0].Enable)
|
||||
{
|
||||
ref ScissorState scissorState = ref _state.State.ScissorState[0];
|
||||
ref ScissorState scissorState = ref scissorStateSpan[0];
|
||||
|
||||
fullClear = scissorState.X1 == screenScissorState.X &&
|
||||
scissorState.Y1 == screenScissorState.Y &&
|
||||
@@ -892,9 +894,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
int scissorW = screenScissorState.Width;
|
||||
int scissorH = screenScissorState.Height;
|
||||
|
||||
if (clearAffectedByScissor && _state.State.ScissorState[0].Enable)
|
||||
if (clearAffectedByScissor && scissorStateSpan[0].Enable)
|
||||
{
|
||||
ref ScissorState scissorState = ref _state.State.ScissorState[0];
|
||||
ref ScissorState scissorState = ref scissorStateSpan[0];
|
||||
|
||||
scissorX = Math.Max(scissorX, scissorState.X1);
|
||||
scissorY = Math.Max(scissorY, scissorState.Y1);
|
||||
|
||||
Reference in New Issue
Block a user