mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 04:35:46 +00:00
Remove ClearSegments for now
Currently unimplemented and issues are arising with building BindingSegments in general.
This commit is contained in:
parent
997e8d11f7
commit
62602e58b7
1 changed files with 0 additions and 58 deletions
|
@ -28,7 +28,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
private MTLComputePipelineState? _computePipelineCache;
|
private MTLComputePipelineState? _computePipelineCache;
|
||||||
private bool _firstBackgroundUse;
|
private bool _firstBackgroundUse;
|
||||||
|
|
||||||
public ResourceBindingSegment[][] ClearSegments { get; }
|
|
||||||
public ResourceBindingSegment[][] BindingSegments { get; }
|
public ResourceBindingSegment[][] BindingSegments { get; }
|
||||||
// Argument buffer sizes for Vertex or Compute stages
|
// Argument buffer sizes for Vertex or Compute stages
|
||||||
public int[] ArgumentBufferSizes { get; }
|
public int[] ArgumentBufferSizes { get; }
|
||||||
|
@ -53,7 +52,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
_handles[i] = device.NewLibrary(StringHelper.NSString(shader.Code), compileOptions, (library, error) => CompilationResultHandler(library, error, index));
|
_handles[i] = device.NewLibrary(StringHelper.NSString(shader.Code), compileOptions, (library, error) => CompilationResultHandler(library, error, index));
|
||||||
}
|
}
|
||||||
|
|
||||||
ClearSegments = BuildClearSegments(resourceLayout.Sets);
|
|
||||||
(BindingSegments, ArgumentBufferSizes, FragArgumentBufferSizes) = BuildBindingSegments(resourceLayout.SetUsages);
|
(BindingSegments, ArgumentBufferSizes, FragArgumentBufferSizes) = BuildBindingSegments(resourceLayout.SetUsages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,62 +96,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ResourceBindingSegment[][] BuildClearSegments(ReadOnlyCollection<ResourceDescriptorCollection> sets)
|
|
||||||
{
|
|
||||||
ResourceBindingSegment[][] segments = new ResourceBindingSegment[sets.Count][];
|
|
||||||
|
|
||||||
for (int setIndex = 0; setIndex < sets.Count; setIndex++)
|
|
||||||
{
|
|
||||||
List<ResourceBindingSegment> currentSegments = new();
|
|
||||||
|
|
||||||
ResourceDescriptor currentDescriptor = default;
|
|
||||||
int currentCount = 0;
|
|
||||||
|
|
||||||
for (int index = 0; index < sets[setIndex].Descriptors.Count; index++)
|
|
||||||
{
|
|
||||||
ResourceDescriptor descriptor = sets[setIndex].Descriptors[index];
|
|
||||||
|
|
||||||
if (currentDescriptor.Binding + currentCount != descriptor.Binding ||
|
|
||||||
currentDescriptor.Type != descriptor.Type ||
|
|
||||||
currentDescriptor.Stages != descriptor.Stages ||
|
|
||||||
currentDescriptor.Count > 1 ||
|
|
||||||
descriptor.Count > 1)
|
|
||||||
{
|
|
||||||
if (currentCount != 0)
|
|
||||||
{
|
|
||||||
currentSegments.Add(new ResourceBindingSegment(
|
|
||||||
currentDescriptor.Binding,
|
|
||||||
currentCount,
|
|
||||||
currentDescriptor.Type,
|
|
||||||
currentDescriptor.Stages,
|
|
||||||
currentDescriptor.Count > 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
currentDescriptor = descriptor;
|
|
||||||
currentCount = descriptor.Count;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
currentCount += descriptor.Count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentCount != 0)
|
|
||||||
{
|
|
||||||
currentSegments.Add(new ResourceBindingSegment(
|
|
||||||
currentDescriptor.Binding,
|
|
||||||
currentCount,
|
|
||||||
currentDescriptor.Type,
|
|
||||||
currentDescriptor.Stages,
|
|
||||||
currentDescriptor.Count > 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
segments[setIndex] = currentSegments.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
return segments;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static (ResourceBindingSegment[][], int[], int[]) BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages)
|
private static (ResourceBindingSegment[][], int[], int[]) BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages)
|
||||||
{
|
{
|
||||||
ResourceBindingSegment[][] segments = new ResourceBindingSegment[setUsages.Count][];
|
ResourceBindingSegment[][] segments = new ResourceBindingSegment[setUsages.Count][];
|
||||||
|
|
Loading…
Reference in a new issue