Don’t do inline vertex buffer updates
Somehow broke zero buff MTLVertexDescriptor, but fixes broken geoemtry so I’m pushing anyway
This commit is contained in:
parent
6f6ccb7898
commit
6aff6401fb
2 changed files with 7 additions and 19 deletions
|
@ -22,13 +22,12 @@ namespace Ryujinx.Graphics.Metal
|
|||
StencilRef = 1 << 7,
|
||||
Viewports = 1 << 8,
|
||||
Scissors = 1 << 9,
|
||||
VertexBuffers = 1 << 10,
|
||||
Buffers = 1 << 11,
|
||||
VertexTextures = 1 << 12,
|
||||
FragmentTextures = 1 << 13,
|
||||
ComputeTextures = 1 << 14,
|
||||
Buffers = 1 << 10,
|
||||
VertexTextures = 1 << 11,
|
||||
FragmentTextures = 1 << 12,
|
||||
ComputeTextures = 1 << 13,
|
||||
|
||||
RenderAll = RenderPipeline | DepthStencil | DepthClamp | DepthBias | CullMode | FrontFace | StencilRef | Viewports | Scissors | VertexBuffers | Buffers | VertexTextures | FragmentTextures,
|
||||
RenderAll = RenderPipeline | DepthStencil | DepthClamp | DepthBias | CullMode | FrontFace | StencilRef | Viewports | Scissors | Buffers | VertexTextures | FragmentTextures,
|
||||
ComputeAll = ComputePipeline | Buffers | ComputeTextures,
|
||||
All = RenderAll | ComputeAll,
|
||||
}
|
||||
|
|
|
@ -179,6 +179,7 @@ namespace Ryujinx.Graphics.Metal
|
|||
{
|
||||
if (_currentState.Dirty.HasFlag(DirtyFlags.RenderPipeline))
|
||||
{
|
||||
SetVertexBuffers(renderCommandEncoder, _currentState.VertexBuffers);
|
||||
SetRenderPipelineState(renderCommandEncoder);
|
||||
}
|
||||
|
||||
|
@ -222,11 +223,6 @@ namespace Ryujinx.Graphics.Metal
|
|||
SetScissors(renderCommandEncoder);
|
||||
}
|
||||
|
||||
if (_currentState.Dirty.HasFlag(DirtyFlags.VertexBuffers))
|
||||
{
|
||||
SetVertexBuffers(renderCommandEncoder, _currentState.VertexBuffers);
|
||||
}
|
||||
|
||||
if (_currentState.Dirty.HasFlag(DirtyFlags.Buffers))
|
||||
{
|
||||
SetRenderBuffers(renderCommandEncoder, _currentState.UniformBuffers, _currentState.StorageBuffers);
|
||||
|
@ -683,15 +679,8 @@ namespace Ryujinx.Graphics.Metal
|
|||
// Update the buffers on the pipeline
|
||||
UpdatePipelineVertexState(_currentState.VertexBuffers, _currentState.VertexAttribs);
|
||||
|
||||
// Inline update
|
||||
if (_pipeline.Encoders.TryGetRenderEncoder(out MTLRenderCommandEncoder renderCommandEncoder))
|
||||
{
|
||||
SetVertexBuffers(renderCommandEncoder, _currentState.VertexBuffers);
|
||||
return;
|
||||
}
|
||||
|
||||
// Mark dirty
|
||||
_currentState.Dirty |= DirtyFlags.RenderPipeline | DirtyFlags.VertexBuffers;
|
||||
_currentState.Dirty |= DirtyFlags.RenderPipeline;
|
||||
}
|
||||
|
||||
public void UpdateUniformBuffers(ReadOnlySpan<BufferAssignment> buffers)
|
||||
|
|
Loading…
Reference in a new issue