mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 04:35:46 +00:00
Fix zero buff not being reset
This commit is contained in:
parent
ab79959975
commit
9f0a468f55
1 changed files with 10 additions and 4 deletions
|
@ -868,6 +868,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
{
|
{
|
||||||
ref PipelineState pipeline = ref _currentState.Pipeline;
|
ref PipelineState pipeline = ref _currentState.Pipeline;
|
||||||
uint indexMask = 0;
|
uint indexMask = 0;
|
||||||
|
int descriptorCount = 0;
|
||||||
|
|
||||||
for (int i = 0; i < attribDescriptors.Length; i++)
|
for (int i = 0; i < attribDescriptors.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -923,13 +924,18 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ref var zeroBufLayout = ref pipeline.Internal.VertexBindings[(int)Constants.ZeroBufferIndex];
|
||||||
|
|
||||||
// Zero buffer
|
// Zero buffer
|
||||||
if ((indexMask & (1u << (int)Constants.ZeroBufferIndex)) != 0)
|
if ((indexMask & (1u << (int)Constants.ZeroBufferIndex)) != 0)
|
||||||
{
|
{
|
||||||
ref var layout = ref pipeline.Internal.VertexBindings[(int)Constants.ZeroBufferIndex];
|
zeroBufLayout.Stride = 1;
|
||||||
layout.Stride = 1;
|
zeroBufLayout.StepFunction = MTLVertexStepFunction.Constant;
|
||||||
layout.StepFunction = MTLVertexStepFunction.Constant;
|
zeroBufLayout.StepRate = 0;
|
||||||
layout.StepRate = 0;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
zeroBufLayout = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.VertexAttributeDescriptionsCount = (uint)attribDescriptors.Length;
|
pipeline.VertexAttributeDescriptionsCount = (uint)attribDescriptors.Length;
|
||||||
|
|
Loading…
Reference in a new issue