Fix Scott Pilgrim (#15)
* check for null vertex functions * format * Format --------- Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
parent
41e6a04a23
commit
18b852e05d
@ -227,10 +227,16 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
var vertexDescriptor = BuildVertexDescriptor(_currentState.VertexBuffers, _currentState.VertexAttribs);
|
var vertexDescriptor = BuildVertexDescriptor(_currentState.VertexBuffers, _currentState.VertexAttribs);
|
||||||
renderPipelineDescriptor.VertexDescriptor = vertexDescriptor;
|
renderPipelineDescriptor.VertexDescriptor = vertexDescriptor;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (_currentState.VertexFunction != null)
|
if (_currentState.VertexFunction != null)
|
||||||
{
|
{
|
||||||
renderPipelineDescriptor.VertexFunction = _currentState.VertexFunction.Value;
|
renderPipelineDescriptor.VertexFunction = _currentState.VertexFunction.Value;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_currentState.FragmentFunction != null)
|
if (_currentState.FragmentFunction != null)
|
||||||
{
|
{
|
||||||
@ -246,11 +252,14 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
_currentState.BlendColor.Green,
|
_currentState.BlendColor.Green,
|
||||||
_currentState.BlendColor.Blue,
|
_currentState.BlendColor.Blue,
|
||||||
_currentState.BlendColor.Alpha);
|
_currentState.BlendColor.Alpha);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
// Cleanup
|
// Cleanup
|
||||||
renderPipelineDescriptor.Dispose();
|
renderPipelineDescriptor.Dispose();
|
||||||
vertexDescriptor.Dispose();
|
vertexDescriptor.Dispose();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateIndexBuffer(BufferRange buffer, IndexType type)
|
public void UpdateIndexBuffer(BufferRange buffer, IndexType type)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user