Fix wrong face culling once and for all (#1277)
* Viewport swizzle support on NV and clip origin * Initialize default viewport swizzle state, emulate viewport swizzle on shaders when not supported * Address PR feedback
This commit is contained in:
parent
83d94b21d0
commit
a15b951721
16 changed files with 202 additions and 53 deletions
|
@ -5,26 +5,28 @@ namespace Ryujinx.Graphics.GAL
|
|||
public bool SupportsAstcCompression { get; }
|
||||
public bool SupportsImageLoadFormatted { get; }
|
||||
public bool SupportsNonConstantTextureOffset { get; }
|
||||
public bool SupportsViewportSwizzle { get; }
|
||||
|
||||
public int MaximumComputeSharedMemorySize { get; }
|
||||
public int StorageBufferOffsetAlignment { get; }
|
||||
|
||||
public float MaxSupportedAnisotropy { get; }
|
||||
public int MaximumComputeSharedMemorySize { get; }
|
||||
public float MaximumSupportedAnisotropy { get; }
|
||||
public int StorageBufferOffsetAlignment { get; }
|
||||
|
||||
public Capabilities(
|
||||
bool supportsAstcCompression,
|
||||
bool supportsImageLoadFormatted,
|
||||
bool supportsNonConstantTextureOffset,
|
||||
bool supportsViewportSwizzle,
|
||||
int maximumComputeSharedMemorySize,
|
||||
int storageBufferOffsetAlignment,
|
||||
float maxSupportedAnisotropy)
|
||||
float maximumSupportedAnisotropy,
|
||||
int storageBufferOffsetAlignment)
|
||||
{
|
||||
SupportsAstcCompression = supportsAstcCompression;
|
||||
SupportsImageLoadFormatted = supportsImageLoadFormatted;
|
||||
SupportsNonConstantTextureOffset = supportsNonConstantTextureOffset;
|
||||
SupportsViewportSwizzle = supportsViewportSwizzle;
|
||||
MaximumComputeSharedMemorySize = maximumComputeSharedMemorySize;
|
||||
MaximumSupportedAnisotropy = maximumSupportedAnisotropy;
|
||||
StorageBufferOffsetAlignment = storageBufferOffsetAlignment;
|
||||
MaxSupportedAnisotropy = maxSupportedAnisotropy;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,6 +42,8 @@ namespace Ryujinx.Graphics.GAL
|
|||
|
||||
void SetImage(int index, ShaderStage stage, ITexture texture);
|
||||
|
||||
void SetOrigin(Origin origin);
|
||||
|
||||
void SetPointSize(float size);
|
||||
|
||||
void SetPrimitiveRestart(bool enable, int index);
|
||||
|
|
8
Ryujinx.Graphics.GAL/Origin.cs
Normal file
8
Ryujinx.Graphics.GAL/Origin.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum Origin
|
||||
{
|
||||
UpperLeft,
|
||||
LowerLeft
|
||||
}
|
||||
}
|
|
@ -2,13 +2,15 @@ namespace Ryujinx.Graphics.GAL
|
|||
{
|
||||
public enum ViewportSwizzle
|
||||
{
|
||||
PositiveX,
|
||||
NegativeX,
|
||||
PositiveY,
|
||||
NegativeY,
|
||||
PositiveZ,
|
||||
NegativeZ,
|
||||
PositiveW,
|
||||
NegativeW
|
||||
PositiveX = 0,
|
||||
NegativeX = 1,
|
||||
PositiveY = 2,
|
||||
NegativeY = 3,
|
||||
PositiveZ = 4,
|
||||
NegativeZ = 5,
|
||||
PositiveW = 6,
|
||||
NegativeW = 7,
|
||||
|
||||
NegativeFlag = 1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue