mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-28 22:23:23 +01:00
[Ryujinx.Graphics.GAL] Address dotnet-format issues (#5366)
* dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Silence dotnet format IDE0052 warnings * Address dotnet format CA1816 warnings * Address or silence dotnet format CA1069 warnings * Address remaining dotnet format analyzer warnings * Address review comments * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Revert formatting changes for while and for-loops * Another rebase, another dotnet format run * Run dotnet format whitespace after rebase * Run dotnet format style after rebase * Run dotnet format analyzers after rebase * Run dotnet format after rebase and remove unused usings - analyzers - style - whitespace * Disable 'prefer switch expression' rule * Add comments to disabled warnings * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Start working on disabled warnings * Address IDE0251 warnings * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First dotnet format pass * Address review feedback * Add trailing commas * Remove SuppressMessage for IDE0066 * Make explicit Equals implementation implicit
This commit is contained in:
parent
16fa983704
commit
7c989f88bd
161 changed files with 481 additions and 439 deletions
|
@ -9,6 +9,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
Clamp,
|
Clamp,
|
||||||
MirrorClampToEdge,
|
MirrorClampToEdge,
|
||||||
MirrorClampToBorder,
|
MirrorClampToBorder,
|
||||||
MirrorClamp
|
MirrorClamp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Ryujinx.Graphics.GAL
|
namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public struct AdvancedBlendDescriptor
|
public readonly struct AdvancedBlendDescriptor
|
||||||
{
|
{
|
||||||
public AdvancedBlendOp Op { get; }
|
public AdvancedBlendOp Op { get; }
|
||||||
public AdvancedBlendOverlap Overlap { get; }
|
public AdvancedBlendOverlap Overlap { get; }
|
||||||
|
|
|
@ -47,6 +47,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
HslHue,
|
HslHue,
|
||||||
HslSaturation,
|
HslSaturation,
|
||||||
HslColor,
|
HslColor,
|
||||||
HslLuminosity
|
HslLuminosity,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
Uncorrelated,
|
Uncorrelated,
|
||||||
Disjoint,
|
Disjoint,
|
||||||
Conjoint
|
Conjoint,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
SmaaLow,
|
SmaaLow,
|
||||||
SmaaMedium,
|
SmaaMedium,
|
||||||
SmaaHigh,
|
SmaaHigh,
|
||||||
SmaaUltra
|
SmaaUltra,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,30 +4,30 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public bool Enable { get; }
|
public bool Enable { get; }
|
||||||
|
|
||||||
public ColorF BlendConstant { get; }
|
public ColorF BlendConstant { get; }
|
||||||
public BlendOp ColorOp { get; }
|
public BlendOp ColorOp { get; }
|
||||||
public BlendFactor ColorSrcFactor { get; }
|
public BlendFactor ColorSrcFactor { get; }
|
||||||
public BlendFactor ColorDstFactor { get; }
|
public BlendFactor ColorDstFactor { get; }
|
||||||
public BlendOp AlphaOp { get; }
|
public BlendOp AlphaOp { get; }
|
||||||
public BlendFactor AlphaSrcFactor { get; }
|
public BlendFactor AlphaSrcFactor { get; }
|
||||||
public BlendFactor AlphaDstFactor { get; }
|
public BlendFactor AlphaDstFactor { get; }
|
||||||
|
|
||||||
public BlendDescriptor(
|
public BlendDescriptor(
|
||||||
bool enable,
|
bool enable,
|
||||||
ColorF blendConstant,
|
ColorF blendConstant,
|
||||||
BlendOp colorOp,
|
BlendOp colorOp,
|
||||||
BlendFactor colorSrcFactor,
|
BlendFactor colorSrcFactor,
|
||||||
BlendFactor colorDstFactor,
|
BlendFactor colorDstFactor,
|
||||||
BlendOp alphaOp,
|
BlendOp alphaOp,
|
||||||
BlendFactor alphaSrcFactor,
|
BlendFactor alphaSrcFactor,
|
||||||
BlendFactor alphaDstFactor)
|
BlendFactor alphaDstFactor)
|
||||||
{
|
{
|
||||||
Enable = enable;
|
Enable = enable;
|
||||||
BlendConstant = blendConstant;
|
BlendConstant = blendConstant;
|
||||||
ColorOp = colorOp;
|
ColorOp = colorOp;
|
||||||
ColorSrcFactor = colorSrcFactor;
|
ColorSrcFactor = colorSrcFactor;
|
||||||
ColorDstFactor = colorDstFactor;
|
ColorDstFactor = colorDstFactor;
|
||||||
AlphaOp = alphaOp;
|
AlphaOp = alphaOp;
|
||||||
AlphaSrcFactor = alphaSrcFactor;
|
AlphaSrcFactor = alphaSrcFactor;
|
||||||
AlphaDstFactor = alphaDstFactor;
|
AlphaDstFactor = alphaDstFactor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,21 +22,21 @@ namespace Ryujinx.Graphics.GAL
|
||||||
ConstantAlpha,
|
ConstantAlpha,
|
||||||
OneMinusConstantAlpha,
|
OneMinusConstantAlpha,
|
||||||
|
|
||||||
ZeroGl = 0x4000,
|
ZeroGl = 0x4000,
|
||||||
OneGl = 0x4001,
|
OneGl = 0x4001,
|
||||||
SrcColorGl = 0x4300,
|
SrcColorGl = 0x4300,
|
||||||
OneMinusSrcColorGl = 0x4301,
|
OneMinusSrcColorGl = 0x4301,
|
||||||
SrcAlphaGl = 0x4302,
|
SrcAlphaGl = 0x4302,
|
||||||
OneMinusSrcAlphaGl = 0x4303,
|
OneMinusSrcAlphaGl = 0x4303,
|
||||||
DstAlphaGl = 0x4304,
|
DstAlphaGl = 0x4304,
|
||||||
OneMinusDstAlphaGl = 0x4305,
|
OneMinusDstAlphaGl = 0x4305,
|
||||||
DstColorGl = 0x4306,
|
DstColorGl = 0x4306,
|
||||||
OneMinusDstColorGl = 0x4307,
|
OneMinusDstColorGl = 0x4307,
|
||||||
SrcAlphaSaturateGl = 0x4308,
|
SrcAlphaSaturateGl = 0x4308,
|
||||||
Src1ColorGl = 0xc900,
|
Src1ColorGl = 0xc900,
|
||||||
OneMinusSrc1ColorGl = 0xc901,
|
OneMinusSrc1ColorGl = 0xc901,
|
||||||
Src1AlphaGl = 0xc902,
|
Src1AlphaGl = 0xc902,
|
||||||
OneMinusSrc1AlphaGl = 0xc903
|
OneMinusSrc1AlphaGl = 0xc903,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class BlendFactorExtensions
|
public static class BlendFactorExtensions
|
||||||
|
@ -54,9 +54,9 @@ namespace Ryujinx.Graphics.GAL
|
||||||
case BlendFactor.OneMinusSrc1Alpha:
|
case BlendFactor.OneMinusSrc1Alpha:
|
||||||
case BlendFactor.OneMinusSrc1AlphaGl:
|
case BlendFactor.OneMinusSrc1AlphaGl:
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ namespace Ryujinx.Graphics.GAL
|
||||||
Minimum,
|
Minimum,
|
||||||
Maximum,
|
Maximum,
|
||||||
|
|
||||||
AddGl = 0x8006,
|
AddGl = 0x8006,
|
||||||
MinimumGl = 0x8007,
|
MinimumGl = 0x8007,
|
||||||
MaximumGl = 0x8008,
|
MaximumGl = 0x8008,
|
||||||
SubtractGl = 0x800a,
|
SubtractGl = 0x800a,
|
||||||
ReverseSubtractGl = 0x800b
|
ReverseSubtractGl = 0x800b,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public enum BufferAccess
|
public enum BufferAccess
|
||||||
{
|
{
|
||||||
Default,
|
Default,
|
||||||
FlushPersistent
|
FlushPersistent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
Range = range;
|
Range = range;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
private readonly ulong _value;
|
private readonly ulong _value;
|
||||||
|
|
||||||
public static BufferHandle Null => new BufferHandle(0);
|
public static BufferHandle Null => new(0);
|
||||||
|
|
||||||
private BufferHandle(ulong value) => _value = value;
|
private BufferHandle(ulong value) => _value = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,20 +2,20 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public readonly struct BufferRange
|
public readonly struct BufferRange
|
||||||
{
|
{
|
||||||
private static readonly BufferRange _empty = new BufferRange(BufferHandle.Null, 0, 0);
|
private static readonly BufferRange _empty = new(BufferHandle.Null, 0, 0);
|
||||||
|
|
||||||
public static BufferRange Empty => _empty;
|
public static BufferRange Empty => _empty;
|
||||||
|
|
||||||
public BufferHandle Handle { get; }
|
public BufferHandle Handle { get; }
|
||||||
|
|
||||||
public int Offset { get; }
|
public int Offset { get; }
|
||||||
public int Size { get; }
|
public int Size { get; }
|
||||||
|
|
||||||
public BufferRange(BufferHandle handle, int offset, int size)
|
public BufferRange(BufferHandle handle, int offset, int size)
|
||||||
{
|
{
|
||||||
Handle = handle;
|
Handle = handle;
|
||||||
Offset = offset;
|
Offset = offset;
|
||||||
Size = size;
|
Size = size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,4 +149,4 @@ namespace Ryujinx.Graphics.GAL
|
||||||
GatherBiasPrecision = gatherBiasPrecision;
|
GatherBiasPrecision = gatherBiasPrecision;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public enum CompareMode
|
public enum CompareMode
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
CompareRToTexture
|
CompareRToTexture,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,13 @@ namespace Ryujinx.Graphics.GAL
|
||||||
GreaterOrEqual,
|
GreaterOrEqual,
|
||||||
Always,
|
Always,
|
||||||
|
|
||||||
NeverGl = 0x200,
|
NeverGl = 0x200,
|
||||||
LessGl = 0x201,
|
LessGl = 0x201,
|
||||||
EqualGl = 0x202,
|
EqualGl = 0x202,
|
||||||
LessOrEqualGl = 0x203,
|
LessOrEqualGl = 0x203,
|
||||||
GreaterGl = 0x204,
|
GreaterGl = 0x204,
|
||||||
NotEqualGl = 0x205,
|
NotEqualGl = 0x205,
|
||||||
GreaterOrEqualGl = 0x206,
|
GreaterOrEqualGl = 0x206,
|
||||||
AlwaysGl = 0x207,
|
AlwaysGl = 0x207,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
SamplesPassed,
|
SamplesPassed,
|
||||||
PrimitivesGenerated,
|
PrimitivesGenerated,
|
||||||
TransformFeedbackPrimitivesWritten
|
TransformFeedbackPrimitivesWritten,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public enum DepthMode
|
public enum DepthMode
|
||||||
{
|
{
|
||||||
MinusOneToOne,
|
MinusOneToOne,
|
||||||
ZeroToOne
|
ZeroToOne,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public enum DepthStencilMode
|
public enum DepthStencilMode
|
||||||
{
|
{
|
||||||
Depth,
|
Depth,
|
||||||
Stencil
|
Stencil,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,19 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public readonly struct DepthTestDescriptor
|
public readonly struct DepthTestDescriptor
|
||||||
{
|
{
|
||||||
public bool TestEnable { get; }
|
public bool TestEnable { get; }
|
||||||
public bool WriteEnable { get; }
|
public bool WriteEnable { get; }
|
||||||
|
|
||||||
public CompareOp Func { get; }
|
public CompareOp Func { get; }
|
||||||
|
|
||||||
public DepthTestDescriptor(
|
public DepthTestDescriptor(
|
||||||
bool testEnable,
|
bool testEnable,
|
||||||
bool writeEnable,
|
bool writeEnable,
|
||||||
CompareOp func)
|
CompareOp func)
|
||||||
{
|
{
|
||||||
TestEnable = testEnable;
|
TestEnable = testEnable;
|
||||||
WriteEnable = writeEnable;
|
WriteEnable = writeEnable;
|
||||||
Func = func;
|
Func = func;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,4 @@ namespace Ryujinx.Graphics.GAL
|
||||||
IsDiscrete = isDiscrete;
|
IsDiscrete = isDiscrete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,12 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public Extents2D Reduce(int level)
|
public Extents2D Reduce(int level)
|
||||||
{
|
{
|
||||||
int div = 1 << level;
|
int div = 1 << level;
|
||||||
|
|
||||||
return new Extents2D(
|
return new Extents2D(
|
||||||
X1 >> level,
|
X1 >> level,
|
||||||
Y1 >> level,
|
Y1 >> level,
|
||||||
BitUtils.DivRoundUp(X2, div),
|
BitUtils.DivRoundUp(X2, div),
|
||||||
BitUtils.DivRoundUp(Y2, div));
|
BitUtils.DivRoundUp(Y2, div));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,4 @@ namespace Ryujinx.Graphics.GAL
|
||||||
Y2 = y2;
|
Y2 = y2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public enum Face
|
public enum Face
|
||||||
{
|
{
|
||||||
Front = 0x404,
|
Front = 0x404,
|
||||||
Back = 0x405,
|
Back = 0x405,
|
||||||
FrontAndBack = 0x408
|
FrontAndBack = 0x408,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.GAL
|
||||||
B5G5R5A1Unorm,
|
B5G5R5A1Unorm,
|
||||||
A1B5G5R5Unorm,
|
A1B5G5R5Unorm,
|
||||||
B8G8R8A8Unorm,
|
B8G8R8A8Unorm,
|
||||||
B8G8R8A8Srgb
|
B8G8R8A8Srgb,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class FormatExtensions
|
public static class FormatExtensions
|
||||||
|
@ -665,4 +665,4 @@ namespace Ryujinx.Graphics.GAL
|
||||||
return format.IsUint() || format.IsSint();
|
return format.IsUint() || format.IsSint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public enum FrontFace
|
public enum FrontFace
|
||||||
{
|
{
|
||||||
Clockwise = 0x900,
|
Clockwise = 0x900,
|
||||||
CounterClockwise = 0x901
|
CounterClockwise = 0x901,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@ using System;
|
||||||
namespace Ryujinx.Graphics.GAL
|
namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public interface ISampler : IDisposable { }
|
public interface ISampler : IDisposable { }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.GAL
|
namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
|
@ -25,4 +24,4 @@ namespace Ryujinx.Graphics.GAL
|
||||||
void SetStorage(BufferRange buffer);
|
void SetStorage(BufferRange buffer);
|
||||||
void Release();
|
void Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,36 +2,36 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public readonly struct ImageCrop
|
public readonly struct ImageCrop
|
||||||
{
|
{
|
||||||
public int Left { get; }
|
public int Left { get; }
|
||||||
public int Right { get; }
|
public int Right { get; }
|
||||||
public int Top { get; }
|
public int Top { get; }
|
||||||
public int Bottom { get; }
|
public int Bottom { get; }
|
||||||
public bool FlipX { get; }
|
public bool FlipX { get; }
|
||||||
public bool FlipY { get; }
|
public bool FlipY { get; }
|
||||||
public bool IsStretched { get; }
|
public bool IsStretched { get; }
|
||||||
public float AspectRatioX { get; }
|
public float AspectRatioX { get; }
|
||||||
public float AspectRatioY { get; }
|
public float AspectRatioY { get; }
|
||||||
|
|
||||||
public ImageCrop(
|
public ImageCrop(
|
||||||
int left,
|
int left,
|
||||||
int right,
|
int right,
|
||||||
int top,
|
int top,
|
||||||
int bottom,
|
int bottom,
|
||||||
bool flipX,
|
bool flipX,
|
||||||
bool flipY,
|
bool flipY,
|
||||||
bool isStretched,
|
bool isStretched,
|
||||||
float aspectRatioX,
|
float aspectRatioX,
|
||||||
float aspectRatioY)
|
float aspectRatioY)
|
||||||
{
|
{
|
||||||
Left = left;
|
Left = left;
|
||||||
Right = right;
|
Right = right;
|
||||||
Top = top;
|
Top = top;
|
||||||
Bottom = bottom;
|
Bottom = bottom;
|
||||||
FlipX = flipX;
|
FlipX = flipX;
|
||||||
FlipY = flipY;
|
FlipY = flipY;
|
||||||
IsStretched = isStretched;
|
IsStretched = isStretched;
|
||||||
AspectRatioX = aspectRatioX;
|
AspectRatioX = aspectRatioX;
|
||||||
AspectRatioY = aspectRatioY;
|
AspectRatioY = aspectRatioY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
UByte,
|
UByte,
|
||||||
UShort,
|
UShort,
|
||||||
UInt
|
UInt,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,6 @@
|
||||||
CopyInverted = 0x150C,
|
CopyInverted = 0x150C,
|
||||||
OrInverted = 0x150D,
|
OrInverted = 0x150D,
|
||||||
Nand = 0x150E,
|
Nand = 0x150E,
|
||||||
Set = 0x150F
|
Set = 0x150F,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
public enum MagFilter
|
public enum MagFilter
|
||||||
{
|
{
|
||||||
Nearest = 1,
|
Nearest = 1,
|
||||||
Linear
|
Linear,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
NearestMipmapNearest,
|
NearestMipmapNearest,
|
||||||
LinearMipmapNearest,
|
LinearMipmapNearest,
|
||||||
NearestMipmapLinear,
|
NearestMipmapLinear,
|
||||||
LinearMipmapLinear
|
LinearMipmapLinear,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
{
|
{
|
||||||
private ulong _bufferHandle = 0;
|
private ulong _bufferHandle = 0;
|
||||||
|
|
||||||
private Dictionary<BufferHandle, BufferHandle> _bufferMap = new Dictionary<BufferHandle, BufferHandle>();
|
private readonly Dictionary<BufferHandle, BufferHandle> _bufferMap = new();
|
||||||
private HashSet<BufferHandle> _inFlight = new HashSet<BufferHandle>();
|
private readonly HashSet<BufferHandle> _inFlight = new();
|
||||||
private AutoResetEvent _inFlightChanged = new AutoResetEvent(false);
|
private readonly AutoResetEvent _inFlightChanged = new(false);
|
||||||
|
|
||||||
internal BufferHandle CreateBufferHandle()
|
internal BufferHandle CreateBufferHandle()
|
||||||
{
|
{
|
||||||
|
@ -59,14 +59,12 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
internal BufferHandle MapBuffer(BufferHandle handle)
|
internal BufferHandle MapBuffer(BufferHandle handle)
|
||||||
{
|
{
|
||||||
// Maps a threaded buffer to a backend one.
|
// Maps a threaded buffer to a backend one.
|
||||||
// Threaded buffers are returned on creation as the buffer
|
// Threaded buffers are returned on creation as the buffer
|
||||||
// isn't actually created until the queue runs the command.
|
// isn't actually created until the queue runs the command.
|
||||||
|
|
||||||
BufferHandle result;
|
|
||||||
|
|
||||||
lock (_bufferMap)
|
lock (_bufferMap)
|
||||||
{
|
{
|
||||||
if (!_bufferMap.TryGetValue(handle, out result))
|
if (!_bufferMap.TryGetValue(handle, out BufferHandle result))
|
||||||
{
|
{
|
||||||
result = BufferHandle.Null;
|
result = BufferHandle.Null;
|
||||||
}
|
}
|
||||||
|
@ -79,11 +77,10 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
{
|
{
|
||||||
// Blocks until the handle is available.
|
// Blocks until the handle is available.
|
||||||
|
|
||||||
BufferHandle result;
|
|
||||||
|
|
||||||
lock (_bufferMap)
|
lock (_bufferMap)
|
||||||
{
|
{
|
||||||
if (_bufferMap.TryGetValue(handle, out result))
|
if (_bufferMap.TryGetValue(handle, out BufferHandle result))
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -128,9 +125,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
for (int i = 0; i < ranges.Length; i++)
|
for (int i = 0; i < ranges.Length; i++)
|
||||||
{
|
{
|
||||||
ref BufferRange range = ref ranges[i];
|
ref BufferRange range = ref ranges[i];
|
||||||
BufferHandle result;
|
|
||||||
|
|
||||||
if (!_bufferMap.TryGetValue(range.Handle, out result))
|
if (!_bufferMap.TryGetValue(range.Handle, out BufferHandle result))
|
||||||
{
|
{
|
||||||
result = BufferHandle.Null;
|
result = BufferHandle.Null;
|
||||||
}
|
}
|
||||||
|
@ -152,9 +148,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
{
|
{
|
||||||
ref BufferAssignment assignment = ref ranges[i];
|
ref BufferAssignment assignment = ref ranges[i];
|
||||||
BufferRange range = assignment.Range;
|
BufferRange range = assignment.Range;
|
||||||
BufferHandle result;
|
|
||||||
|
|
||||||
if (!_bufferMap.TryGetValue(range.Handle, out result))
|
if (!_bufferMap.TryGetValue(range.Handle, out BufferHandle result))
|
||||||
{
|
{
|
||||||
result = BufferHandle.Null;
|
result = BufferHandle.Null;
|
||||||
}
|
}
|
||||||
|
@ -175,9 +170,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
for (int i = 0; i < ranges.Length; i++)
|
for (int i = 0; i < ranges.Length; i++)
|
||||||
{
|
{
|
||||||
BufferRange range = ranges[i].Buffer;
|
BufferRange range = ranges[i].Buffer;
|
||||||
BufferHandle result;
|
|
||||||
|
|
||||||
if (!_bufferMap.TryGetValue(range.Handle, out result))
|
if (!_bufferMap.TryGetValue(range.Handle, out BufferHandle result))
|
||||||
{
|
{
|
||||||
result = BufferHandle.Null;
|
result = BufferHandle.Null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
{
|
{
|
||||||
private delegate void CommandDelegate(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer);
|
private delegate void CommandDelegate(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer);
|
||||||
|
|
||||||
private static int _totalCommands = (int)Enum.GetValues<CommandType>().Max() + 1;
|
private static readonly int _totalCommands = (int)Enum.GetValues<CommandType>().Max() + 1;
|
||||||
private static CommandDelegate[] _lookup = new CommandDelegate[_totalCommands];
|
private static readonly CommandDelegate[] _lookup = new CommandDelegate[_totalCommands];
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private static ref T GetCommand<T>(Span<byte> memory)
|
private static ref T GetCommand<T>(Span<byte> memory)
|
||||||
|
@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static void RunCommand(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer)
|
public static void RunCommand(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
_lookup[memory[memory.Length - 1]](memory, threaded, renderer);
|
_lookup[memory[^1]](memory, threaded, renderer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,6 @@
|
||||||
TextureBarrierTiled,
|
TextureBarrierTiled,
|
||||||
TryHostConditionalRendering,
|
TryHostConditionalRendering,
|
||||||
TryHostConditionalRenderingFlush,
|
TryHostConditionalRenderingFlush,
|
||||||
UpdateRenderScale
|
UpdateRenderScale,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct BarrierCommand : IGALCommand, IGALCommand<BarrierCommand>
|
struct BarrierCommand : IGALCommand, IGALCommand<BarrierCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.Barrier;
|
public readonly CommandType CommandType => CommandType.Barrier;
|
||||||
|
|
||||||
public static void Run(ref BarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref BarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct BeginTransformFeedbackCommand : IGALCommand, IGALCommand<BeginTransformFeedbackCommand>
|
struct BeginTransformFeedbackCommand : IGALCommand, IGALCommand<BeginTransformFeedbackCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.BeginTransformFeedback;
|
public readonly CommandType CommandType => CommandType.BeginTransformFeedback;
|
||||||
private PrimitiveTopology _topology;
|
private PrimitiveTopology _topology;
|
||||||
|
|
||||||
public void Set(PrimitiveTopology topology)
|
public void Set(PrimitiveTopology topology)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct BufferDisposeCommand : IGALCommand, IGALCommand<BufferDisposeCommand>
|
struct BufferDisposeCommand : IGALCommand, IGALCommand<BufferDisposeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.BufferDispose;
|
public readonly CommandType CommandType => CommandType.BufferDispose;
|
||||||
private BufferHandle _buffer;
|
private BufferHandle _buffer;
|
||||||
|
|
||||||
public void Set(BufferHandle buffer)
|
public void Set(BufferHandle buffer)
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
|
||||||
{
|
{
|
||||||
struct BufferGetDataCommand : IGALCommand, IGALCommand<BufferGetDataCommand>
|
struct BufferGetDataCommand : IGALCommand, IGALCommand<BufferGetDataCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.BufferGetData;
|
public readonly CommandType CommandType => CommandType.BufferGetData;
|
||||||
private BufferHandle _buffer;
|
private BufferHandle _buffer;
|
||||||
private int _offset;
|
private int _offset;
|
||||||
private int _size;
|
private int _size;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
|
||||||
{
|
{
|
||||||
struct BufferSetDataCommand : IGALCommand, IGALCommand<BufferSetDataCommand>
|
struct BufferSetDataCommand : IGALCommand, IGALCommand<BufferSetDataCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.BufferSetData;
|
public readonly CommandType CommandType => CommandType.BufferSetData;
|
||||||
private BufferHandle _buffer;
|
private BufferHandle _buffer;
|
||||||
private int _offset;
|
private int _offset;
|
||||||
private SpanRef<byte> _data;
|
private SpanRef<byte> _data;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct ClearBufferCommand : IGALCommand, IGALCommand<ClearBufferCommand>
|
struct ClearBufferCommand : IGALCommand, IGALCommand<ClearBufferCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ClearBuffer;
|
public readonly CommandType CommandType => CommandType.ClearBuffer;
|
||||||
private BufferHandle _destination;
|
private BufferHandle _destination;
|
||||||
private int _offset;
|
private int _offset;
|
||||||
private int _size;
|
private int _size;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct ClearRenderTargetColorCommand : IGALCommand, IGALCommand<ClearRenderTargetColorCommand>
|
struct ClearRenderTargetColorCommand : IGALCommand, IGALCommand<ClearRenderTargetColorCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ClearRenderTargetColor;
|
public readonly CommandType CommandType => CommandType.ClearRenderTargetColor;
|
||||||
private int _index;
|
private int _index;
|
||||||
private int _layer;
|
private int _layer;
|
||||||
private int _layerCount;
|
private int _layerCount;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct ClearRenderTargetDepthStencilCommand : IGALCommand, IGALCommand<ClearRenderTargetDepthStencilCommand>
|
struct ClearRenderTargetDepthStencilCommand : IGALCommand, IGALCommand<ClearRenderTargetDepthStencilCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
|
public readonly CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
|
||||||
private int _layer;
|
private int _layer;
|
||||||
private int _layerCount;
|
private int _layerCount;
|
||||||
private float _depthValue;
|
private float _depthValue;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CommandBufferBarrierCommand : IGALCommand, IGALCommand<CommandBufferBarrierCommand>
|
struct CommandBufferBarrierCommand : IGALCommand, IGALCommand<CommandBufferBarrierCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CommandBufferBarrier;
|
public readonly CommandType CommandType => CommandType.CommandBufferBarrier;
|
||||||
|
|
||||||
public static void Run(ref CommandBufferBarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref CommandBufferBarrierCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CopyBufferCommand : IGALCommand, IGALCommand<CopyBufferCommand>
|
struct CopyBufferCommand : IGALCommand, IGALCommand<CopyBufferCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CopyBuffer;
|
public readonly CommandType CommandType => CommandType.CopyBuffer;
|
||||||
private BufferHandle _source;
|
private BufferHandle _source;
|
||||||
private BufferHandle _destination;
|
private BufferHandle _destination;
|
||||||
private int _srcOffset;
|
private int _srcOffset;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
|
||||||
{
|
{
|
||||||
struct CounterEventDisposeCommand : IGALCommand, IGALCommand<CounterEventDisposeCommand>
|
struct CounterEventDisposeCommand : IGALCommand, IGALCommand<CounterEventDisposeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CounterEventDispose;
|
public readonly CommandType CommandType => CommandType.CounterEventDispose;
|
||||||
private TableRef<ThreadedCounterEvent> _event;
|
private TableRef<ThreadedCounterEvent> _event;
|
||||||
|
|
||||||
public void Set(TableRef<ThreadedCounterEvent> evt)
|
public void Set(TableRef<ThreadedCounterEvent> evt)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
|
||||||
{
|
{
|
||||||
struct CounterEventFlushCommand : IGALCommand, IGALCommand<CounterEventFlushCommand>
|
struct CounterEventFlushCommand : IGALCommand, IGALCommand<CounterEventFlushCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CounterEventFlush;
|
public readonly CommandType CommandType => CommandType.CounterEventFlush;
|
||||||
private TableRef<ThreadedCounterEvent> _event;
|
private TableRef<ThreadedCounterEvent> _event;
|
||||||
|
|
||||||
public void Set(TableRef<ThreadedCounterEvent> evt)
|
public void Set(TableRef<ThreadedCounterEvent> evt)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct DispatchComputeCommand : IGALCommand, IGALCommand<DispatchComputeCommand>
|
struct DispatchComputeCommand : IGALCommand, IGALCommand<DispatchComputeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DispatchCompute;
|
public readonly CommandType CommandType => CommandType.DispatchCompute;
|
||||||
private int _groupsX;
|
private int _groupsX;
|
||||||
private int _groupsY;
|
private int _groupsY;
|
||||||
private int _groupsZ;
|
private int _groupsZ;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct DrawIndexedCommand : IGALCommand, IGALCommand<DrawIndexedCommand>
|
struct DrawIndexedCommand : IGALCommand, IGALCommand<DrawIndexedCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawIndexed;
|
public readonly CommandType CommandType => CommandType.DrawIndexed;
|
||||||
private int _indexCount;
|
private int _indexCount;
|
||||||
private int _instanceCount;
|
private int _instanceCount;
|
||||||
private int _firstIndex;
|
private int _firstIndex;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct DrawCommand : IGALCommand, IGALCommand<DrawCommand>
|
struct DrawCommand : IGALCommand, IGALCommand<DrawCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.Draw;
|
public readonly CommandType CommandType => CommandType.Draw;
|
||||||
private int _vertexCount;
|
private int _vertexCount;
|
||||||
private int _instanceCount;
|
private int _instanceCount;
|
||||||
private int _firstVertex;
|
private int _firstVertex;
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct DrawIndexedIndirectCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCommand>
|
struct DrawIndexedIndirectCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawIndexedIndirect;
|
public readonly CommandType CommandType => CommandType.DrawIndexedIndirect;
|
||||||
private BufferRange _indirectBuffer;
|
private BufferRange _indirectBuffer;
|
||||||
|
|
||||||
public void Set(BufferRange indirectBuffer)
|
public void Set(BufferRange indirectBuffer)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct DrawIndexedIndirectCountCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCountCommand>
|
struct DrawIndexedIndirectCountCommand : IGALCommand, IGALCommand<DrawIndexedIndirectCountCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawIndexedIndirectCount;
|
public readonly CommandType CommandType => CommandType.DrawIndexedIndirectCount;
|
||||||
private BufferRange _indirectBuffer;
|
private BufferRange _indirectBuffer;
|
||||||
private BufferRange _parameterBuffer;
|
private BufferRange _parameterBuffer;
|
||||||
private int _maxDrawCount;
|
private int _maxDrawCount;
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct DrawIndirectCommand : IGALCommand, IGALCommand<DrawIndirectCommand>
|
struct DrawIndirectCommand : IGALCommand, IGALCommand<DrawIndirectCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawIndirect;
|
public readonly CommandType CommandType => CommandType.DrawIndirect;
|
||||||
private BufferRange _indirectBuffer;
|
private BufferRange _indirectBuffer;
|
||||||
|
|
||||||
public void Set(BufferRange indirectBuffer)
|
public void Set(BufferRange indirectBuffer)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct DrawIndirectCountCommand : IGALCommand, IGALCommand<DrawIndirectCountCommand>
|
struct DrawIndirectCountCommand : IGALCommand, IGALCommand<DrawIndirectCountCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawIndirectCount;
|
public readonly CommandType CommandType => CommandType.DrawIndirectCount;
|
||||||
private BufferRange _indirectBuffer;
|
private BufferRange _indirectBuffer;
|
||||||
private BufferRange _parameterBuffer;
|
private BufferRange _parameterBuffer;
|
||||||
private int _maxDrawCount;
|
private int _maxDrawCount;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct DrawTextureCommand : IGALCommand, IGALCommand<DrawTextureCommand>
|
struct DrawTextureCommand : IGALCommand, IGALCommand<DrawTextureCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.DrawTexture;
|
public readonly CommandType CommandType => CommandType.DrawTexture;
|
||||||
private TableRef<ITexture> _texture;
|
private TableRef<ITexture> _texture;
|
||||||
private TableRef<ISampler> _sampler;
|
private TableRef<ISampler> _sampler;
|
||||||
private Extents2DF _srcRegion;
|
private Extents2DF _srcRegion;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct EndHostConditionalRenderingCommand : IGALCommand, IGALCommand<EndHostConditionalRenderingCommand>
|
struct EndHostConditionalRenderingCommand : IGALCommand, IGALCommand<EndHostConditionalRenderingCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.EndHostConditionalRendering;
|
public readonly CommandType CommandType => CommandType.EndHostConditionalRendering;
|
||||||
|
|
||||||
public static void Run(ref EndHostConditionalRenderingCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref EndHostConditionalRenderingCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct EndTransformFeedbackCommand : IGALCommand, IGALCommand<EndTransformFeedbackCommand>
|
struct EndTransformFeedbackCommand : IGALCommand, IGALCommand<EndTransformFeedbackCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.EndTransformFeedback;
|
public readonly CommandType CommandType => CommandType.EndTransformFeedback;
|
||||||
|
|
||||||
public static void Run(ref EndTransformFeedbackCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref EndTransformFeedbackCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
|
||||||
{
|
{
|
||||||
struct ProgramCheckLinkCommand : IGALCommand, IGALCommand<ProgramCheckLinkCommand>
|
struct ProgramCheckLinkCommand : IGALCommand, IGALCommand<ProgramCheckLinkCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ProgramCheckLink;
|
public readonly CommandType CommandType => CommandType.ProgramCheckLink;
|
||||||
private TableRef<ThreadedProgram> _program;
|
private TableRef<ThreadedProgram> _program;
|
||||||
private bool _blocking;
|
private bool _blocking;
|
||||||
private TableRef<ResultBox<ProgramLinkStatus>> _result;
|
private TableRef<ResultBox<ProgramLinkStatus>> _result;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
|
||||||
{
|
{
|
||||||
struct ProgramDisposeCommand : IGALCommand, IGALCommand<ProgramDisposeCommand>
|
struct ProgramDisposeCommand : IGALCommand, IGALCommand<ProgramDisposeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ProgramDispose;
|
public readonly CommandType CommandType => CommandType.ProgramDispose;
|
||||||
private TableRef<ThreadedProgram> _program;
|
private TableRef<ThreadedProgram> _program;
|
||||||
|
|
||||||
public void Set(TableRef<ThreadedProgram> program)
|
public void Set(TableRef<ThreadedProgram> program)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Program
|
||||||
{
|
{
|
||||||
struct ProgramGetBinaryCommand : IGALCommand, IGALCommand<ProgramGetBinaryCommand>
|
struct ProgramGetBinaryCommand : IGALCommand, IGALCommand<ProgramGetBinaryCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ProgramGetBinary;
|
public readonly CommandType CommandType => CommandType.ProgramGetBinary;
|
||||||
private TableRef<ThreadedProgram> _program;
|
private TableRef<ThreadedProgram> _program;
|
||||||
private TableRef<ResultBox<byte[]>> _result;
|
private TableRef<ResultBox<byte[]>> _result;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct ActionCommand : IGALCommand, IGALCommand<ActionCommand>
|
struct ActionCommand : IGALCommand, IGALCommand<ActionCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.Action;
|
public readonly CommandType CommandType => CommandType.Action;
|
||||||
private TableRef<Action> _action;
|
private TableRef<Action> _action;
|
||||||
|
|
||||||
public void Set(TableRef<Action> action)
|
public void Set(TableRef<Action> action)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CreateBufferAccessCommand : IGALCommand, IGALCommand<CreateBufferAccessCommand>
|
struct CreateBufferAccessCommand : IGALCommand, IGALCommand<CreateBufferAccessCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateBufferAccess;
|
public readonly CommandType CommandType => CommandType.CreateBufferAccess;
|
||||||
private BufferHandle _threadedHandle;
|
private BufferHandle _threadedHandle;
|
||||||
private int _size;
|
private int _size;
|
||||||
private BufferAccess _access;
|
private BufferAccess _access;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CreateBufferCommand : IGALCommand, IGALCommand<CreateBufferCommand>
|
struct CreateBufferCommand : IGALCommand, IGALCommand<CreateBufferCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateBuffer;
|
public readonly CommandType CommandType => CommandType.CreateBuffer;
|
||||||
private BufferHandle _threadedHandle;
|
private BufferHandle _threadedHandle;
|
||||||
private int _size;
|
private int _size;
|
||||||
private BufferHandle _storageHint;
|
private BufferHandle _storageHint;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CreateHostBufferCommand : IGALCommand, IGALCommand<CreateHostBufferCommand>
|
struct CreateHostBufferCommand : IGALCommand, IGALCommand<CreateHostBufferCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateHostBuffer;
|
public readonly CommandType CommandType => CommandType.CreateHostBuffer;
|
||||||
private BufferHandle _threadedHandle;
|
private BufferHandle _threadedHandle;
|
||||||
private nint _pointer;
|
private nint _pointer;
|
||||||
private int _size;
|
private int _size;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct CreateProgramCommand : IGALCommand, IGALCommand<CreateProgramCommand>
|
struct CreateProgramCommand : IGALCommand, IGALCommand<CreateProgramCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateProgram;
|
public readonly CommandType CommandType => CommandType.CreateProgram;
|
||||||
private TableRef<IProgramRequest> _request;
|
private TableRef<IProgramRequest> _request;
|
||||||
|
|
||||||
public void Set(TableRef<IProgramRequest> request)
|
public void Set(TableRef<IProgramRequest> request)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct CreateSamplerCommand : IGALCommand, IGALCommand<CreateSamplerCommand>
|
struct CreateSamplerCommand : IGALCommand, IGALCommand<CreateSamplerCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateSampler;
|
public readonly CommandType CommandType => CommandType.CreateSampler;
|
||||||
private TableRef<ThreadedSampler> _sampler;
|
private TableRef<ThreadedSampler> _sampler;
|
||||||
private SamplerCreateInfo _info;
|
private SamplerCreateInfo _info;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct CreateSyncCommand : IGALCommand, IGALCommand<CreateSyncCommand>
|
struct CreateSyncCommand : IGALCommand, IGALCommand<CreateSyncCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateSync;
|
public readonly CommandType CommandType => CommandType.CreateSync;
|
||||||
private ulong _id;
|
private ulong _id;
|
||||||
private bool _strict;
|
private bool _strict;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct CreateTextureCommand : IGALCommand, IGALCommand<CreateTextureCommand>
|
struct CreateTextureCommand : IGALCommand, IGALCommand<CreateTextureCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.CreateTexture;
|
public readonly CommandType CommandType => CommandType.CreateTexture;
|
||||||
private TableRef<ThreadedTexture> _texture;
|
private TableRef<ThreadedTexture> _texture;
|
||||||
private TextureCreateInfo _info;
|
private TextureCreateInfo _info;
|
||||||
private float _scale;
|
private float _scale;
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct GetCapabilitiesCommand : IGALCommand, IGALCommand<GetCapabilitiesCommand>
|
struct GetCapabilitiesCommand : IGALCommand, IGALCommand<GetCapabilitiesCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.GetCapabilities;
|
public readonly CommandType CommandType => CommandType.GetCapabilities;
|
||||||
private TableRef<ResultBox<Capabilities>> _result;
|
private TableRef<ResultBox<Capabilities>> _result;
|
||||||
|
|
||||||
public void Set(TableRef<ResultBox<Capabilities>> result)
|
public void Set(TableRef<ResultBox<Capabilities>> result)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct PreFrameCommand : IGALCommand, IGALCommand<PreFrameCommand>
|
struct PreFrameCommand : IGALCommand, IGALCommand<PreFrameCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.PreFrame;
|
public readonly CommandType CommandType => CommandType.PreFrame;
|
||||||
|
|
||||||
public static void Run(ref PreFrameCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref PreFrameCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||||
{
|
{
|
||||||
struct ReportCounterCommand : IGALCommand, IGALCommand<ReportCounterCommand>
|
struct ReportCounterCommand : IGALCommand, IGALCommand<ReportCounterCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ReportCounter;
|
public readonly CommandType CommandType => CommandType.ReportCounter;
|
||||||
private TableRef<ThreadedCounterEvent> _event;
|
private TableRef<ThreadedCounterEvent> _event;
|
||||||
private CounterType _type;
|
private CounterType _type;
|
||||||
private TableRef<EventHandler<ulong>> _resultHandler;
|
private TableRef<EventHandler<ulong>> _resultHandler;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct ResetCounterCommand : IGALCommand, IGALCommand<ResetCounterCommand>
|
struct ResetCounterCommand : IGALCommand, IGALCommand<ResetCounterCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.ResetCounter;
|
public readonly CommandType CommandType => CommandType.ResetCounter;
|
||||||
private CounterType _type;
|
private CounterType _type;
|
||||||
|
|
||||||
public void Set(CounterType type)
|
public void Set(CounterType type)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct UpdateCountersCommand : IGALCommand, IGALCommand<UpdateCountersCommand>
|
struct UpdateCountersCommand : IGALCommand, IGALCommand<UpdateCountersCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.UpdateCounters;
|
public readonly CommandType CommandType => CommandType.UpdateCounters;
|
||||||
|
|
||||||
public static void Run(ref UpdateCountersCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
public static void Run(ref UpdateCountersCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Sampler
|
||||||
{
|
{
|
||||||
struct SamplerDisposeCommand : IGALCommand, IGALCommand<SamplerDisposeCommand>
|
struct SamplerDisposeCommand : IGALCommand, IGALCommand<SamplerDisposeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SamplerDispose;
|
public readonly CommandType CommandType => CommandType.SamplerDispose;
|
||||||
private TableRef<ThreadedSampler> _sampler;
|
private TableRef<ThreadedSampler> _sampler;
|
||||||
|
|
||||||
public void Set(TableRef<ThreadedSampler> sampler)
|
public void Set(TableRef<ThreadedSampler> sampler)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetAlphaTestCommand : IGALCommand, IGALCommand<SetAlphaTestCommand>
|
struct SetAlphaTestCommand : IGALCommand, IGALCommand<SetAlphaTestCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetAlphaTest;
|
public readonly CommandType CommandType => CommandType.SetAlphaTest;
|
||||||
private bool _enable;
|
private bool _enable;
|
||||||
private float _reference;
|
private float _reference;
|
||||||
private CompareOp _op;
|
private CompareOp _op;
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetBlendStateAdvancedCommand : IGALCommand, IGALCommand<SetBlendStateAdvancedCommand>
|
struct SetBlendStateAdvancedCommand : IGALCommand, IGALCommand<SetBlendStateAdvancedCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetBlendStateAdvanced;
|
public readonly CommandType CommandType => CommandType.SetBlendStateAdvanced;
|
||||||
private AdvancedBlendDescriptor _blend;
|
private AdvancedBlendDescriptor _blend;
|
||||||
|
|
||||||
public void Set(AdvancedBlendDescriptor blend)
|
public void Set(AdvancedBlendDescriptor blend)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetBlendStateCommand : IGALCommand, IGALCommand<SetBlendStateCommand>
|
struct SetBlendStateCommand : IGALCommand, IGALCommand<SetBlendStateCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetBlendState;
|
public readonly CommandType CommandType => CommandType.SetBlendState;
|
||||||
private int _index;
|
private int _index;
|
||||||
private BlendDescriptor _blend;
|
private BlendDescriptor _blend;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetDepthBiasCommand : IGALCommand, IGALCommand<SetDepthBiasCommand>
|
struct SetDepthBiasCommand : IGALCommand, IGALCommand<SetDepthBiasCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetDepthBias;
|
public readonly CommandType CommandType => CommandType.SetDepthBias;
|
||||||
private PolygonModeMask _enables;
|
private PolygonModeMask _enables;
|
||||||
private float _factor;
|
private float _factor;
|
||||||
private float _units;
|
private float _units;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetDepthClampCommand : IGALCommand, IGALCommand<SetDepthClampCommand>
|
struct SetDepthClampCommand : IGALCommand, IGALCommand<SetDepthClampCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetDepthClamp;
|
public readonly CommandType CommandType => CommandType.SetDepthClamp;
|
||||||
private bool _clamp;
|
private bool _clamp;
|
||||||
|
|
||||||
public void Set(bool clamp)
|
public void Set(bool clamp)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetDepthModeCommand : IGALCommand, IGALCommand<SetDepthModeCommand>
|
struct SetDepthModeCommand : IGALCommand, IGALCommand<SetDepthModeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetDepthMode;
|
public readonly CommandType CommandType => CommandType.SetDepthMode;
|
||||||
private DepthMode _mode;
|
private DepthMode _mode;
|
||||||
|
|
||||||
public void Set(DepthMode mode)
|
public void Set(DepthMode mode)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetDepthTestCommand : IGALCommand, IGALCommand<SetDepthTestCommand>
|
struct SetDepthTestCommand : IGALCommand, IGALCommand<SetDepthTestCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetDepthTest;
|
public readonly CommandType CommandType => CommandType.SetDepthTest;
|
||||||
private DepthTestDescriptor _depthTest;
|
private DepthTestDescriptor _depthTest;
|
||||||
|
|
||||||
public void Set(DepthTestDescriptor depthTest)
|
public void Set(DepthTestDescriptor depthTest)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetFaceCullingCommand : IGALCommand, IGALCommand<SetFaceCullingCommand>
|
struct SetFaceCullingCommand : IGALCommand, IGALCommand<SetFaceCullingCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetFaceCulling;
|
public readonly CommandType CommandType => CommandType.SetFaceCulling;
|
||||||
private bool _enable;
|
private bool _enable;
|
||||||
private Face _face;
|
private Face _face;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetFrontFaceCommand : IGALCommand, IGALCommand<SetFrontFaceCommand>
|
struct SetFrontFaceCommand : IGALCommand, IGALCommand<SetFrontFaceCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetFrontFace;
|
public readonly CommandType CommandType => CommandType.SetFrontFace;
|
||||||
private FrontFace _frontFace;
|
private FrontFace _frontFace;
|
||||||
|
|
||||||
public void Set(FrontFace frontFace)
|
public void Set(FrontFace frontFace)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand>
|
struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetImage;
|
public readonly CommandType CommandType => CommandType.SetImage;
|
||||||
private int _binding;
|
private int _binding;
|
||||||
private TableRef<ITexture> _texture;
|
private TableRef<ITexture> _texture;
|
||||||
private Format _imageFormat;
|
private Format _imageFormat;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetIndexBufferCommand : IGALCommand, IGALCommand<SetIndexBufferCommand>
|
struct SetIndexBufferCommand : IGALCommand, IGALCommand<SetIndexBufferCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetIndexBuffer;
|
public readonly CommandType CommandType => CommandType.SetIndexBuffer;
|
||||||
private BufferRange _buffer;
|
private BufferRange _buffer;
|
||||||
private IndexType _type;
|
private IndexType _type;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetLineParametersCommand : IGALCommand, IGALCommand<SetLineParametersCommand>
|
struct SetLineParametersCommand : IGALCommand, IGALCommand<SetLineParametersCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetLineParameters;
|
public readonly CommandType CommandType => CommandType.SetLineParameters;
|
||||||
private float _width;
|
private float _width;
|
||||||
private bool _smooth;
|
private bool _smooth;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetLogicOpStateCommand : IGALCommand, IGALCommand<SetLogicOpStateCommand>
|
struct SetLogicOpStateCommand : IGALCommand, IGALCommand<SetLogicOpStateCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetLogicOpState;
|
public readonly CommandType CommandType => CommandType.SetLogicOpState;
|
||||||
private bool _enable;
|
private bool _enable;
|
||||||
private LogicalOp _op;
|
private LogicalOp _op;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetMultisampleStateCommand : IGALCommand, IGALCommand<SetMultisampleStateCommand>
|
struct SetMultisampleStateCommand : IGALCommand, IGALCommand<SetMultisampleStateCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetMultisampleState;
|
public readonly CommandType CommandType => CommandType.SetMultisampleState;
|
||||||
private MultisampleDescriptor _multisample;
|
private MultisampleDescriptor _multisample;
|
||||||
|
|
||||||
public void Set(MultisampleDescriptor multisample)
|
public void Set(MultisampleDescriptor multisample)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetPatchParametersCommand : IGALCommand, IGALCommand<SetPatchParametersCommand>
|
struct SetPatchParametersCommand : IGALCommand, IGALCommand<SetPatchParametersCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetPatchParameters;
|
public readonly CommandType CommandType => CommandType.SetPatchParameters;
|
||||||
private int _vertices;
|
private int _vertices;
|
||||||
private Array4<float> _defaultOuterLevel;
|
private Array4<float> _defaultOuterLevel;
|
||||||
private Array2<float> _defaultInnerLevel;
|
private Array2<float> _defaultInnerLevel;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetPointParametersCommand : IGALCommand, IGALCommand<SetPointParametersCommand>
|
struct SetPointParametersCommand : IGALCommand, IGALCommand<SetPointParametersCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetPointParameters;
|
public readonly CommandType CommandType => CommandType.SetPointParameters;
|
||||||
private float _size;
|
private float _size;
|
||||||
private bool _isProgramPointSize;
|
private bool _isProgramPointSize;
|
||||||
private bool _enablePointSprite;
|
private bool _enablePointSprite;
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetPolygonModeCommand : IGALCommand, IGALCommand<SetPolygonModeCommand>
|
struct SetPolygonModeCommand : IGALCommand, IGALCommand<SetPolygonModeCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetPolygonMode;
|
public readonly CommandType CommandType => CommandType.SetPolygonMode;
|
||||||
private PolygonMode _frontMode;
|
private PolygonMode _frontMode;
|
||||||
private PolygonMode _backMode;
|
private PolygonMode _backMode;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetPrimitiveRestartCommand : IGALCommand, IGALCommand<SetPrimitiveRestartCommand>
|
struct SetPrimitiveRestartCommand : IGALCommand, IGALCommand<SetPrimitiveRestartCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetPrimitiveRestart;
|
public readonly CommandType CommandType => CommandType.SetPrimitiveRestart;
|
||||||
private bool _enable;
|
private bool _enable;
|
||||||
private int _index;
|
private int _index;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetPrimitiveTopologyCommand : IGALCommand, IGALCommand<SetPrimitiveTopologyCommand>
|
struct SetPrimitiveTopologyCommand : IGALCommand, IGALCommand<SetPrimitiveTopologyCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetPrimitiveTopology;
|
public readonly CommandType CommandType => CommandType.SetPrimitiveTopology;
|
||||||
private PrimitiveTopology _topology;
|
private PrimitiveTopology _topology;
|
||||||
|
|
||||||
public void Set(PrimitiveTopology topology)
|
public void Set(PrimitiveTopology topology)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetProgramCommand : IGALCommand, IGALCommand<SetProgramCommand>
|
struct SetProgramCommand : IGALCommand, IGALCommand<SetProgramCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetProgram;
|
public readonly CommandType CommandType => CommandType.SetProgram;
|
||||||
private TableRef<IProgram> _program;
|
private TableRef<IProgram> _program;
|
||||||
|
|
||||||
public void Set(TableRef<IProgram> program)
|
public void Set(TableRef<IProgram> program)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetRasterizerDiscardCommand : IGALCommand, IGALCommand<SetRasterizerDiscardCommand>
|
struct SetRasterizerDiscardCommand : IGALCommand, IGALCommand<SetRasterizerDiscardCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetRasterizerDiscard;
|
public readonly CommandType CommandType => CommandType.SetRasterizerDiscard;
|
||||||
private bool _discard;
|
private bool _discard;
|
||||||
|
|
||||||
public void Set(bool discard)
|
public void Set(bool discard)
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
|
struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetRenderTargetColorMasks;
|
public readonly CommandType CommandType => CommandType.SetRenderTargetColorMasks;
|
||||||
private SpanRef<uint> _componentMask;
|
private SpanRef<uint> _componentMask;
|
||||||
|
|
||||||
public void Set(SpanRef<uint> componentMask)
|
public void Set(SpanRef<uint> componentMask)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetRenderTargetScaleCommand : IGALCommand, IGALCommand<SetRenderTargetScaleCommand>
|
struct SetRenderTargetScaleCommand : IGALCommand, IGALCommand<SetRenderTargetScaleCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetRenderTargetScale;
|
public readonly CommandType CommandType => CommandType.SetRenderTargetScale;
|
||||||
private float _scale;
|
private float _scale;
|
||||||
|
|
||||||
public void Set(float scale)
|
public void Set(float scale)
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetRenderTargetsCommand : IGALCommand, IGALCommand<SetRenderTargetsCommand>
|
struct SetRenderTargetsCommand : IGALCommand, IGALCommand<SetRenderTargetsCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetRenderTargets;
|
public readonly CommandType CommandType => CommandType.SetRenderTargets;
|
||||||
private TableRef<ITexture[]> _colors;
|
private TableRef<ITexture[]> _colors;
|
||||||
private TableRef<ITexture> _depthStencil;
|
private TableRef<ITexture> _depthStencil;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||||
{
|
{
|
||||||
struct SetScissorsCommand : IGALCommand, IGALCommand<SetScissorsCommand>
|
struct SetScissorsCommand : IGALCommand, IGALCommand<SetScissorsCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetScissor;
|
public readonly CommandType CommandType => CommandType.SetScissor;
|
||||||
private SpanRef<Rectangle<int>> _scissors;
|
private SpanRef<Rectangle<int>> _scissors;
|
||||||
|
|
||||||
public void Set(SpanRef<Rectangle<int>> scissors)
|
public void Set(SpanRef<Rectangle<int>> scissors)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
struct SetStencilTestCommand : IGALCommand, IGALCommand<SetStencilTestCommand>
|
struct SetStencilTestCommand : IGALCommand, IGALCommand<SetStencilTestCommand>
|
||||||
{
|
{
|
||||||
public CommandType CommandType => CommandType.SetStencilTest;
|
public readonly CommandType CommandType => CommandType.SetStencilTest;
|
||||||
private StencilTestDescriptor _stencilTest;
|
private StencilTestDescriptor _stencilTest;
|
||||||
|
|
||||||
public void Set(StencilTestDescriptor stencilTest)
|
public void Set(StencilTestDescriptor stencilTest)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue