aa021085cf
* Allow any shader SSBO constant buffer slot and offset * Fix slot value passed to SetUsedStorageBuffer on fallback case * Shader cache version * Ensure that the storage buffer source constant buffer offset is word aligned * Fix FirstBinding on GetUniformBufferDescriptors
40 lines
No EOL
1 KiB
C#
40 lines
No EOL
1 KiB
C#
namespace Ryujinx.Graphics.Shader
|
|
{
|
|
public struct BufferDescriptor
|
|
{
|
|
// New fields should be added to the end of the struct to keep disk shader cache compatibility.
|
|
|
|
public readonly int Binding;
|
|
public readonly byte Slot;
|
|
public readonly byte SbCbSlot;
|
|
public readonly ushort SbCbOffset;
|
|
public BufferUsageFlags Flags;
|
|
|
|
public BufferDescriptor(int binding, int slot)
|
|
{
|
|
Binding = binding;
|
|
Slot = (byte)slot;
|
|
SbCbSlot = 0;
|
|
SbCbOffset = 0;
|
|
|
|
Flags = BufferUsageFlags.None;
|
|
}
|
|
|
|
public BufferDescriptor(int binding, int slot, int sbCbSlot, int sbCbOffset)
|
|
{
|
|
Binding = binding;
|
|
Slot = (byte)slot;
|
|
SbCbSlot = (byte)sbCbSlot;
|
|
SbCbOffset = (ushort)sbCbOffset;
|
|
|
|
Flags = BufferUsageFlags.None;
|
|
}
|
|
|
|
public BufferDescriptor SetFlag(BufferUsageFlags flag)
|
|
{
|
|
Flags |= flag;
|
|
|
|
return this;
|
|
}
|
|
}
|
|
} |