mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Some checks are pending
Canary release job / Create tag (push) Waiting to run
Canary release job / Release for linux-arm64 (push) Waiting to run
Canary release job / Release for linux-x64 (push) Waiting to run
Canary release job / Release for win-x64 (push) Waiting to run
Canary release job / Release MacOS universal (push) Waiting to run
63 lines
1.5 KiB
C#
63 lines
1.5 KiB
C#
using SharpMetal.Metal;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Ryujinx.Graphics.Metal
|
|
{
|
|
public struct RenderEncoderBindings
|
|
{
|
|
public List<Resource> Resources = [];
|
|
public List<BufferResource> VertexBuffers = [];
|
|
public List<BufferResource> FragmentBuffers = [];
|
|
|
|
public RenderEncoderBindings() { }
|
|
|
|
public readonly void Clear()
|
|
{
|
|
Resources.Clear();
|
|
VertexBuffers.Clear();
|
|
FragmentBuffers.Clear();
|
|
}
|
|
}
|
|
|
|
public struct ComputeEncoderBindings
|
|
{
|
|
public List<Resource> Resources = [];
|
|
public List<BufferResource> Buffers = [];
|
|
|
|
public ComputeEncoderBindings() { }
|
|
|
|
public readonly void Clear()
|
|
{
|
|
Resources.Clear();
|
|
Buffers.Clear();
|
|
}
|
|
}
|
|
|
|
public struct BufferResource
|
|
{
|
|
public MTLBuffer Buffer;
|
|
public ulong Offset;
|
|
public ulong Binding;
|
|
|
|
public BufferResource(MTLBuffer buffer, ulong offset, ulong binding)
|
|
{
|
|
Buffer = buffer;
|
|
Offset = offset;
|
|
Binding = binding;
|
|
}
|
|
}
|
|
|
|
public struct Resource
|
|
{
|
|
public MTLResource MtlResource;
|
|
public MTLResourceUsage ResourceUsage;
|
|
public MTLRenderStages Stages;
|
|
|
|
public Resource(MTLResource resource, MTLResourceUsage resourceUsage, MTLRenderStages stages)
|
|
{
|
|
MtlResource = resource;
|
|
ResourceUsage = resourceUsage;
|
|
Stages = stages;
|
|
}
|
|
}
|
|
}
|