aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-01-05 22:04:37 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit18814d44b2e19f7a93ed48ef4799ced585d071e9 (patch)
tree23270d97f5836e3eb7b07c905259065718504422 /Ryujinx.Graphics.Gpu/State
parent383452f5cf2a81d50ef1a5e630fba45c6fb97647 (diff)
Address PR feedback
Add TODO comment for GL_EXT_polygon_offset_clamp
Diffstat (limited to 'Ryujinx.Graphics.Gpu/State')
-rw-r--r--Ryujinx.Graphics.Gpu/State/PrimitiveTopology.cs30
-rw-r--r--Ryujinx.Graphics.Gpu/State/RtFormat.cs110
2 files changed, 70 insertions, 70 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/PrimitiveTopology.cs b/Ryujinx.Graphics.Gpu/State/PrimitiveTopology.cs
index bb9eb5a7..340991c2 100644
--- a/Ryujinx.Graphics.Gpu/State/PrimitiveTopology.cs
+++ b/Ryujinx.Graphics.Gpu/State/PrimitiveTopology.cs
@@ -35,22 +35,22 @@ namespace Ryujinx.Graphics.Gpu.State
{
return type switch
{
- PrimitiveType.Points => PrimitiveTopology.Points,
- PrimitiveType.Lines => PrimitiveTopology.Lines,
- PrimitiveType.LineLoop => PrimitiveTopology.LineLoop,
- PrimitiveType.LineStrip => PrimitiveTopology.LineStrip,
- PrimitiveType.Triangles => PrimitiveTopology.Triangles,
- PrimitiveType.TriangleStrip => PrimitiveTopology.TriangleStrip,
- PrimitiveType.TriangleFan => PrimitiveTopology.TriangleFan,
- PrimitiveType.Quads => PrimitiveTopology.Quads,
- PrimitiveType.QuadStrip => PrimitiveTopology.QuadStrip,
- PrimitiveType.Polygon => PrimitiveTopology.Polygon,
- PrimitiveType.LinesAdjacency => PrimitiveTopology.LinesAdjacency,
- PrimitiveType.LineStripAdjacency => PrimitiveTopology.LineStripAdjacency,
- PrimitiveType.TrianglesAdjacency => PrimitiveTopology.TrianglesAdjacency,
+ PrimitiveType.Points => PrimitiveTopology.Points,
+ PrimitiveType.Lines => PrimitiveTopology.Lines,
+ PrimitiveType.LineLoop => PrimitiveTopology.LineLoop,
+ PrimitiveType.LineStrip => PrimitiveTopology.LineStrip,
+ PrimitiveType.Triangles => PrimitiveTopology.Triangles,
+ PrimitiveType.TriangleStrip => PrimitiveTopology.TriangleStrip,
+ PrimitiveType.TriangleFan => PrimitiveTopology.TriangleFan,
+ PrimitiveType.Quads => PrimitiveTopology.Quads,
+ PrimitiveType.QuadStrip => PrimitiveTopology.QuadStrip,
+ PrimitiveType.Polygon => PrimitiveTopology.Polygon,
+ PrimitiveType.LinesAdjacency => PrimitiveTopology.LinesAdjacency,
+ PrimitiveType.LineStripAdjacency => PrimitiveTopology.LineStripAdjacency,
+ PrimitiveType.TrianglesAdjacency => PrimitiveTopology.TrianglesAdjacency,
PrimitiveType.TriangleStripAdjacency => PrimitiveTopology.TriangleStripAdjacency,
- PrimitiveType.Patches => PrimitiveTopology.Patches,
- _ => PrimitiveTopology.Triangles
+ PrimitiveType.Patches => PrimitiveTopology.Patches,
+ _ => PrimitiveTopology.Triangles
};
}
}
diff --git a/Ryujinx.Graphics.Gpu/State/RtFormat.cs b/Ryujinx.Graphics.Gpu/State/RtFormat.cs
index e6490336..003da9ed 100644
--- a/Ryujinx.Graphics.Gpu/State/RtFormat.cs
+++ b/Ryujinx.Graphics.Gpu/State/RtFormat.cs
@@ -81,67 +81,67 @@ namespace Ryujinx.Graphics.Gpu.State
{
return format switch
{
- RtFormat.D32Float => new FormatInfo(Format.D32Float, 1, 1, 4),
- RtFormat.D16Unorm => new FormatInfo(Format.D16Unorm, 1, 1, 2),
- RtFormat.D24UnormS8Uint => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
- RtFormat.D24Unorm => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
- RtFormat.S8UintD24Unorm => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
- RtFormat.S8Uint => new FormatInfo(Format.S8Uint, 1, 1, 1),
- RtFormat.D32FloatS8Uint => new FormatInfo(Format.D32FloatS8Uint, 1, 1, 8),
+ RtFormat.D32Float => new FormatInfo(Format.D32Float, 1, 1, 4),
+ RtFormat.D16Unorm => new FormatInfo(Format.D16Unorm, 1, 1, 2),
+ RtFormat.D24UnormS8Uint => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
+ RtFormat.D24Unorm => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
+ RtFormat.S8UintD24Unorm => new FormatInfo(Format.D24UnormS8Uint, 1, 1, 4),
+ RtFormat.S8Uint => new FormatInfo(Format.S8Uint, 1, 1, 1),
+ RtFormat.D32FloatS8Uint => new FormatInfo(Format.D32FloatS8Uint, 1, 1, 8),
RtFormat.R32G32B32A32Float => new FormatInfo(Format.R32G32B32A32Float, 1, 1, 16),
- RtFormat.R32G32B32A32Sint => new FormatInfo(Format.R32G32B32A32Sint, 1, 1, 16),
- RtFormat.R32G32B32A32Uint => new FormatInfo(Format.R32G32B32A32Uint, 1, 1, 16),
+ RtFormat.R32G32B32A32Sint => new FormatInfo(Format.R32G32B32A32Sint, 1, 1, 16),
+ RtFormat.R32G32B32A32Uint => new FormatInfo(Format.R32G32B32A32Uint, 1, 1, 16),
RtFormat.R32G32B32X32Float => new FormatInfo(Format.R32G32B32A32Float, 1, 1, 16),
- RtFormat.R32G32B32X32Sint => new FormatInfo(Format.R32G32B32A32Sint, 1, 1, 16),
- RtFormat.R32G32B32X32Uint => new FormatInfo(Format.R32G32B32A32Uint, 1, 1, 16),
+ RtFormat.R32G32B32X32Sint => new FormatInfo(Format.R32G32B32A32Sint, 1, 1, 16),
+ RtFormat.R32G32B32X32Uint => new FormatInfo(Format.R32G32B32A32Uint, 1, 1, 16),
RtFormat.R16G16B16X16Unorm => new FormatInfo(Format.R16G16B16A16Unorm, 1, 1, 8),
RtFormat.R16G16B16X16Snorm => new FormatInfo(Format.R16G16B16A16Snorm, 1, 1, 8),
- RtFormat.R16G16B16X16Sint => new FormatInfo(Format.R16G16B16A16Sint, 1, 1, 8),
- RtFormat.R16G16B16X16Uint => new FormatInfo(Format.R16G16B16A16Uint, 1, 1, 8),
+ RtFormat.R16G16B16X16Sint => new FormatInfo(Format.R16G16B16A16Sint, 1, 1, 8),
+ RtFormat.R16G16B16X16Uint => new FormatInfo(Format.R16G16B16A16Uint, 1, 1, 8),
RtFormat.R16G16B16A16Float => new FormatInfo(Format.R16G16B16A16Float, 1, 1, 8),
- RtFormat.R32G32Float => new FormatInfo(Format.R32G32Float, 1, 1, 8),
- RtFormat.R32G32Sint => new FormatInfo(Format.R32G32Sint, 1, 1, 8),
- RtFormat.R32G32Uint => new FormatInfo(Format.R32G32Uint, 1, 1, 8),
+ RtFormat.R32G32Float => new FormatInfo(Format.R32G32Float, 1, 1, 8),
+ RtFormat.R32G32Sint => new FormatInfo(Format.R32G32Sint, 1, 1, 8),
+ RtFormat.R32G32Uint => new FormatInfo(Format.R32G32Uint, 1, 1, 8),
RtFormat.R16G16B16X16Float => new FormatInfo(Format.R16G16B16A16Float, 1, 1, 8),
- RtFormat.B8G8R8A8Unorm => new FormatInfo(Format.B8G8R8A8Unorm, 1, 1, 4),
- RtFormat.B8G8R8A8Srgb => new FormatInfo(Format.B8G8R8A8Srgb, 1, 1, 4),
- RtFormat.R10G10B10A2Unorm => new FormatInfo(Format.R10G10B10A2Unorm, 1, 1, 4),
- RtFormat.R10G10B10A2Uint => new FormatInfo(Format.R10G10B10A2Uint, 1, 1, 4),
- RtFormat.R8G8B8A8Unorm => new FormatInfo(Format.R8G8B8A8Unorm, 1, 1, 4),
- RtFormat.R8G8B8A8Srgb => new FormatInfo(Format.R8G8B8A8Srgb, 1, 1, 4),
- RtFormat.R8G8B8X8Snorm => new FormatInfo(Format.R8G8B8A8Snorm, 1, 1, 4),
- RtFormat.R8G8B8X8Sint => new FormatInfo(Format.R8G8B8A8Sint, 1, 1, 4),
- RtFormat.R8G8B8X8Uint => new FormatInfo(Format.R8G8B8A8Uint, 1, 1, 4),
- RtFormat.R16G16Unorm => new FormatInfo(Format.R16G16Unorm, 1, 1, 4),
- RtFormat.R16G16Snorm => new FormatInfo(Format.R16G16Snorm, 1, 1, 4),
- RtFormat.R16G16Sint => new FormatInfo(Format.R16G16Sint, 1, 1, 4),
- RtFormat.R16G16Uint => new FormatInfo(Format.R16G16Uint, 1, 1, 4),
- RtFormat.R16G16Float => new FormatInfo(Format.R16G16Float, 1, 1, 4),
- RtFormat.R11G11B10Float => new FormatInfo(Format.R11G11B10Float, 1, 1, 4),
- RtFormat.R32Sint => new FormatInfo(Format.R32Sint, 1, 1, 4),
- RtFormat.R32Uint => new FormatInfo(Format.R32Uint, 1, 1, 4),
- RtFormat.R32Float => new FormatInfo(Format.R32Float, 1, 1, 4),
- RtFormat.B8G8R8X8Unorm => new FormatInfo(Format.B8G8R8A8Unorm, 1, 1, 4),
- RtFormat.B8G8R8X8Srgb => new FormatInfo(Format.B8G8R8A8Srgb, 1, 1, 4),
- RtFormat.B5G6R5Unorm => new FormatInfo(Format.B5G6R5Unorm, 1, 1, 2),
- RtFormat.B5G5R5A1Unorm => new FormatInfo(Format.B5G5R5A1Unorm, 1, 1, 2),
- RtFormat.R8G8Unorm => new FormatInfo(Format.R8G8Unorm, 1, 1, 2),
- RtFormat.R8G8Snorm => new FormatInfo(Format.R8G8Snorm, 1, 1, 2),
- RtFormat.R8G8Sint => new FormatInfo(Format.R8G8Sint, 1, 1, 2),
- RtFormat.R8G8Uint => new FormatInfo(Format.R8G8Uint, 1, 1, 2),
- RtFormat.R16Unorm => new FormatInfo(Format.R16Unorm, 1, 1, 2),
- RtFormat.R16Snorm => new FormatInfo(Format.R16Snorm, 1, 1, 2),
- RtFormat.R16Sint => new FormatInfo(Format.R16Sint, 1, 1, 2),
- RtFormat.R16Uint => new FormatInfo(Format.R16Uint, 1, 1, 2),
- RtFormat.R16Float => new FormatInfo(Format.R16Float, 1, 1, 2),
- RtFormat.R8Unorm => new FormatInfo(Format.R8Unorm, 1, 1, 1),
- RtFormat.R8Snorm => new FormatInfo(Format.R8Snorm, 1, 1, 1),
- RtFormat.R8Sint => new FormatInfo(Format.R8Sint, 1, 1, 1),
- RtFormat.R8Uint => new FormatInfo(Format.R8Uint, 1, 1, 1),
- RtFormat.B5G5R5X1Unorm => new FormatInfo(Format.B5G5R5X1Unorm, 1, 1, 2),
- RtFormat.R8G8B8X8Unorm => new FormatInfo(Format.R8G8B8A8Unorm, 1, 1, 4),
- RtFormat.R8G8B8X8Srgb => new FormatInfo(Format.R8G8B8A8Srgb, 1, 1, 4),
- _ => FormatInfo.Default
+ RtFormat.B8G8R8A8Unorm => new FormatInfo(Format.B8G8R8A8Unorm, 1, 1, 4),
+ RtFormat.B8G8R8A8Srgb => new FormatInfo(Format.B8G8R8A8Srgb, 1, 1, 4),
+ RtFormat.R10G10B10A2Unorm => new FormatInfo(Format.R10G10B10A2Unorm, 1, 1, 4),
+ RtFormat.R10G10B10A2Uint => new FormatInfo(Format.R10G10B10A2Uint, 1, 1, 4),
+ RtFormat.R8G8B8A8Unorm => new FormatInfo(Format.R8G8B8A8Unorm, 1, 1, 4),
+ RtFormat.R8G8B8A8Srgb => new FormatInfo(Format.R8G8B8A8Srgb, 1, 1, 4),
+ RtFormat.R8G8B8X8Snorm => new FormatInfo(Format.R8G8B8A8Snorm, 1, 1, 4),
+ RtFormat.R8G8B8X8Sint => new FormatInfo(Format.R8G8B8A8Sint, 1, 1, 4),
+ RtFormat.R8G8B8X8Uint => new FormatInfo(Format.R8G8B8A8Uint, 1, 1, 4),
+ RtFormat.R16G16Unorm => new FormatInfo(Format.R16G16Unorm, 1, 1, 4),
+ RtFormat.R16G16Snorm => new FormatInfo(Format.R16G16Snorm, 1, 1, 4),
+ RtFormat.R16G16Sint => new FormatInfo(Format.R16G16Sint, 1, 1, 4),
+ RtFormat.R16G16Uint => new FormatInfo(Format.R16G16Uint, 1, 1, 4),
+ RtFormat.R16G16Float => new FormatInfo(Format.R16G16Float, 1, 1, 4),
+ RtFormat.R11G11B10Float => new FormatInfo(Format.R11G11B10Float, 1, 1, 4),
+ RtFormat.R32Sint => new FormatInfo(Format.R32Sint, 1, 1, 4),
+ RtFormat.R32Uint => new FormatInfo(Format.R32Uint, 1, 1, 4),
+ RtFormat.R32Float => new FormatInfo(Format.R32Float, 1, 1, 4),
+ RtFormat.B8G8R8X8Unorm => new FormatInfo(Format.B8G8R8A8Unorm, 1, 1, 4),
+ RtFormat.B8G8R8X8Srgb => new FormatInfo(Format.B8G8R8A8Srgb, 1, 1, 4),
+ RtFormat.B5G6R5Unorm => new FormatInfo(Format.B5G6R5Unorm, 1, 1, 2),
+ RtFormat.B5G5R5A1Unorm => new FormatInfo(Format.B5G5R5A1Unorm, 1, 1, 2),
+ RtFormat.R8G8Unorm => new FormatInfo(Format.R8G8Unorm, 1, 1, 2),
+ RtFormat.R8G8Snorm => new FormatInfo(Format.R8G8Snorm, 1, 1, 2),
+ RtFormat.R8G8Sint => new FormatInfo(Format.R8G8Sint, 1, 1, 2),
+ RtFormat.R8G8Uint => new FormatInfo(Format.R8G8Uint, 1, 1, 2),
+ RtFormat.R16Unorm => new FormatInfo(Format.R16Unorm, 1, 1, 2),
+ RtFormat.R16Snorm => new FormatInfo(Format.R16Snorm, 1, 1, 2),
+ RtFormat.R16Sint => new FormatInfo(Format.R16Sint, 1, 1, 2),
+ RtFormat.R16Uint => new FormatInfo(Format.R16Uint, 1, 1, 2),
+ RtFormat.R16Float => new FormatInfo(Format.R16Float, 1, 1, 2),
+ RtFormat.R8Unorm => new FormatInfo(Format.R8Unorm, 1, 1, 1),
+ RtFormat.R8Snorm => new FormatInfo(Format.R8Snorm, 1, 1, 1),
+ RtFormat.R8Sint => new FormatInfo(Format.R8Sint, 1, 1, 1),
+ RtFormat.R8Uint => new FormatInfo(Format.R8Uint, 1, 1, 1),
+ RtFormat.B5G5R5X1Unorm => new FormatInfo(Format.B5G5R5X1Unorm, 1, 1, 2),
+ RtFormat.R8G8B8X8Unorm => new FormatInfo(Format.R8G8B8A8Unorm, 1, 1, 4),
+ RtFormat.R8G8B8X8Srgb => new FormatInfo(Format.R8G8B8A8Srgb, 1, 1, 4),
+ _ => FormatInfo.Default
};
}
}