Only make render target 2D textures layered if needed (#2646)
* Only make render target 2D textures layered if needed * Shader cache version bump * Ensure topology is updated on channel swap
This commit is contained in:
parent
312be74861
commit
fd7567a6b5
11 changed files with 85 additions and 16 deletions
|
@ -13,6 +13,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||
private readonly GpuChannel _channel;
|
||||
private readonly DeviceStateWithShadow<ThreedClassState> _state;
|
||||
private readonly DrawState _drawState;
|
||||
private bool _topologySet;
|
||||
|
||||
private bool _instancedDrawPending;
|
||||
private bool _instancedIndexed;
|
||||
|
@ -43,6 +44,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||
_drawState = drawState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks the entire state as dirty, forcing a full host state update before the next draw.
|
||||
/// </summary>
|
||||
public void ForceStateDirty()
|
||||
{
|
||||
_topologySet = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pushes four 8-bit index buffer elements.
|
||||
/// </summary>
|
||||
|
@ -224,11 +233,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||
_instanceIndex = 0;
|
||||
}
|
||||
|
||||
if (_drawState.Topology != topology)
|
||||
if (_drawState.Topology != topology || !_topologySet)
|
||||
{
|
||||
_context.Renderer.Pipeline.SetPrimitiveTopology(topology);
|
||||
|
||||
_drawState.Topology = topology;
|
||||
_topologySet = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -331,6 +340,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||
|
||||
_context.Renderer.Pipeline.SetPrimitiveTopology(topology);
|
||||
_drawState.Topology = topology;
|
||||
_topologySet = true;
|
||||
|
||||
ConditionalRenderEnabled renderEnable = ConditionalRendering.GetRenderEnable(
|
||||
_context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue