diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-29 14:41:50 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 654e617fe78b0f5cc86d0bcf0625301abff168f5 (patch) | |
| tree | 01f2eba89039698bec583a3e29c4c50d0e20b8d1 /Ryujinx.Graphics.GAL | |
| parent | af8498d6790ba83f1cf87eccf5f272f2ccbeb169 (diff) | |
Some code cleanup
Diffstat (limited to 'Ryujinx.Graphics.GAL')
| -rw-r--r-- | Ryujinx.Graphics.GAL/AddressMode.cs (renamed from Ryujinx.Graphics.GAL/Sampler/AddressMode.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/BlendDescriptor.cs (renamed from Ryujinx.Graphics.GAL/Blend/BlendDescriptor.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/BlendFactor.cs (renamed from Ryujinx.Graphics.GAL/Blend/BlendFactor.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/BlendOp.cs (renamed from Ryujinx.Graphics.GAL/Blend/BlendOp.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/Color/ColorSI.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/Color/ColorUI.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/ColorF.cs (renamed from Ryujinx.Graphics.GAL/Color/ColorF.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/CompareMode.cs (renamed from Ryujinx.Graphics.GAL/Sampler/CompareMode.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/DepthStencilMode.cs (renamed from Ryujinx.Graphics.GAL/Texture/DepthStencilMode.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/DepthStencilState.cs (renamed from Ryujinx.Graphics.GAL/DepthStencil/DepthStencilState.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/DepthTestDescriptor.cs (renamed from Ryujinx.Graphics.GAL/DepthStencil/DepthTestDescriptor.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/IPipeline.cs | 44 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/IRenderer.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/ITexture.cs | 1 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/MagFilter.cs (renamed from Ryujinx.Graphics.GAL/Sampler/MagFilter.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/MinFilter.cs (renamed from Ryujinx.Graphics.GAL/Sampler/MinFilter.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/SamplerCreateInfo.cs (renamed from Ryujinx.Graphics.GAL/Sampler/SamplerCreateInfo.cs) | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/StencilOp.cs (renamed from Ryujinx.Graphics.GAL/DepthStencil/StencilOp.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/StencilTestDescriptor.cs (renamed from Ryujinx.Graphics.GAL/DepthStencil/StencilTestDescriptor.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/SwizzleComponent.cs (renamed from Ryujinx.Graphics.GAL/Texture/SwizzleComponent.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/Target.cs (renamed from Ryujinx.Graphics.GAL/Texture/Target.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/TextureCreateInfo.cs (renamed from Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/VertexAttribDescriptor.cs (renamed from Ryujinx.Graphics.GAL/InputAssembler/VertexAttribDescriptor.cs) | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.GAL/VertexBufferDescriptor.cs (renamed from Ryujinx.Graphics.GAL/InputAssembler/VertexBufferDescriptor.cs) | 2 |
24 files changed, 39 insertions, 84 deletions
diff --git a/Ryujinx.Graphics.GAL/Sampler/AddressMode.cs b/Ryujinx.Graphics.GAL/AddressMode.cs index 4f56d892..153925b1 100644 --- a/Ryujinx.Graphics.GAL/Sampler/AddressMode.cs +++ b/Ryujinx.Graphics.GAL/AddressMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Sampler +namespace Ryujinx.Graphics.GAL { public enum AddressMode { diff --git a/Ryujinx.Graphics.GAL/Blend/BlendDescriptor.cs b/Ryujinx.Graphics.GAL/BlendDescriptor.cs index d7ef8004..b35a0169 100644 --- a/Ryujinx.Graphics.GAL/Blend/BlendDescriptor.cs +++ b/Ryujinx.Graphics.GAL/BlendDescriptor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Blend +namespace Ryujinx.Graphics.GAL { public struct BlendDescriptor { diff --git a/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs b/Ryujinx.Graphics.GAL/BlendFactor.cs index f92e5b3a..135873e9 100644 --- a/Ryujinx.Graphics.GAL/Blend/BlendFactor.cs +++ b/Ryujinx.Graphics.GAL/BlendFactor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Blend +namespace Ryujinx.Graphics.GAL { public enum BlendFactor { diff --git a/Ryujinx.Graphics.GAL/Blend/BlendOp.cs b/Ryujinx.Graphics.GAL/BlendOp.cs index 566dafd9..de1ab67d 100644 --- a/Ryujinx.Graphics.GAL/Blend/BlendOp.cs +++ b/Ryujinx.Graphics.GAL/BlendOp.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Blend +namespace Ryujinx.Graphics.GAL { public enum BlendOp { diff --git a/Ryujinx.Graphics.GAL/Color/ColorSI.cs b/Ryujinx.Graphics.GAL/Color/ColorSI.cs deleted file mode 100644 index 9cde0406..00000000 --- a/Ryujinx.Graphics.GAL/Color/ColorSI.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Ryujinx.Graphics.GAL.Color -{ - public struct ColorSI - { - public int Red { get; } - public int Green { get; } - public int Blue { get; } - public int Alpha { get; } - - public ColorSI(int red, int green, int blue, int alpha) - { - Red = red; - Green = green; - Blue = blue; - Alpha = alpha; - } - } -} diff --git a/Ryujinx.Graphics.GAL/Color/ColorUI.cs b/Ryujinx.Graphics.GAL/Color/ColorUI.cs deleted file mode 100644 index 3bac84ef..00000000 --- a/Ryujinx.Graphics.GAL/Color/ColorUI.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Ryujinx.Graphics.GAL.Color -{ - public struct ColorUI - { - public uint Red { get; } - public uint Green { get; } - public uint Blue { get; } - public uint Alpha { get; } - - public ColorUI(uint red, uint green, uint blue, uint alpha) - { - Red = red; - Green = green; - Blue = blue; - Alpha = alpha; - } - } -} diff --git a/Ryujinx.Graphics.GAL/Color/ColorF.cs b/Ryujinx.Graphics.GAL/ColorF.cs index bc4b32b8..2e971a62 100644 --- a/Ryujinx.Graphics.GAL/Color/ColorF.cs +++ b/Ryujinx.Graphics.GAL/ColorF.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Color +namespace Ryujinx.Graphics.GAL { public struct ColorF { diff --git a/Ryujinx.Graphics.GAL/Sampler/CompareMode.cs b/Ryujinx.Graphics.GAL/CompareMode.cs index ca4b09a0..7a64d9bb 100644 --- a/Ryujinx.Graphics.GAL/Sampler/CompareMode.cs +++ b/Ryujinx.Graphics.GAL/CompareMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Sampler +namespace Ryujinx.Graphics.GAL { public enum CompareMode { diff --git a/Ryujinx.Graphics.GAL/Texture/DepthStencilMode.cs b/Ryujinx.Graphics.GAL/DepthStencilMode.cs index d7a379d8..e80d0d4b 100644 --- a/Ryujinx.Graphics.GAL/Texture/DepthStencilMode.cs +++ b/Ryujinx.Graphics.GAL/DepthStencilMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Texture +namespace Ryujinx.Graphics.GAL { public enum DepthStencilMode { diff --git a/Ryujinx.Graphics.GAL/DepthStencil/DepthStencilState.cs b/Ryujinx.Graphics.GAL/DepthStencilState.cs index 93b8d50e..d81e8436 100644 --- a/Ryujinx.Graphics.GAL/DepthStencil/DepthStencilState.cs +++ b/Ryujinx.Graphics.GAL/DepthStencilState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.DepthStencil +namespace Ryujinx.Graphics.GAL { public struct DepthStencilState { diff --git a/Ryujinx.Graphics.GAL/DepthStencil/DepthTestDescriptor.cs b/Ryujinx.Graphics.GAL/DepthTestDescriptor.cs index 98b1429b..c835e941 100644 --- a/Ryujinx.Graphics.GAL/DepthStencil/DepthTestDescriptor.cs +++ b/Ryujinx.Graphics.GAL/DepthTestDescriptor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.DepthStencil +namespace Ryujinx.Graphics.GAL { public struct DepthTestDescriptor { diff --git a/Ryujinx.Graphics.GAL/IPipeline.cs b/Ryujinx.Graphics.GAL/IPipeline.cs index 7211fbe0..1a502913 100644 --- a/Ryujinx.Graphics.GAL/IPipeline.cs +++ b/Ryujinx.Graphics.GAL/IPipeline.cs @@ -1,33 +1,10 @@ -using Ryujinx.Graphics.GAL.Blend; -using Ryujinx.Graphics.GAL.Color; -using Ryujinx.Graphics.GAL.DepthStencil; -using Ryujinx.Graphics.GAL.InputAssembler; using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.GAL { public interface IPipeline { - void BindBlendState(int index, BlendDescriptor blend); - - void BindIndexBuffer(BufferRange buffer, IndexType type); - - void BindImage(int index, ShaderStage stage, ITexture texture); - - void BindProgram(IProgram program); - - void BindSampler(int index, ShaderStage stage, ISampler sampler); - void BindTexture(int index, ShaderStage stage, ITexture texture); - - void BindStorageBuffer(int index, ShaderStage stage, BufferRange buffer); - void BindUniformBuffer(int index, ShaderStage stage, BufferRange buffer); - - void BindVertexAttribs(VertexAttribDescriptor[] vertexAttribs); - void BindVertexBuffers(VertexBufferDescriptor[] vertexBuffers); - void ClearRenderTargetColor(int index, uint componentMask, ColorF color); - void ClearRenderTargetColor(int index, uint componentMask, ColorSI color); - void ClearRenderTargetColor(int index, uint componentMask, ColorUI color); void ClearRenderTargetDepthStencil( float depthValue, @@ -35,7 +12,7 @@ namespace Ryujinx.Graphics.GAL int stencilValue, int stencilMask); - void Dispatch(int groupsX, int groupsY, int groupsZ); + void DispatchCompute(int groupsX, int groupsY, int groupsZ); void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance); void DrawIndexed( @@ -45,6 +22,8 @@ namespace Ryujinx.Graphics.GAL int firstVertex, int firstInstance); + void SetBlendState(int index, BlendDescriptor blend); + void SetBlendColor(ColorF color); void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp); @@ -57,16 +36,33 @@ namespace Ryujinx.Graphics.GAL void SetFrontFace(FrontFace frontFace); + void SetIndexBuffer(BufferRange buffer, IndexType type); + + void SetImage(int index, ShaderStage stage, ITexture texture); + void SetPrimitiveRestart(bool enable, int index); void SetPrimitiveTopology(PrimitiveTopology topology); + void SetProgram(IProgram program); + void SetRenderTargetColorMasks(uint[] componentMask); void SetRenderTargets(ITexture[] colors, ITexture depthStencil); + void SetSampler(int index, ShaderStage stage, ISampler sampler); + void SetStencilTest(StencilTestDescriptor stencilTest); + void SetStorageBuffer(int index, ShaderStage stage, BufferRange buffer); + + void SetTexture(int index, ShaderStage stage, ITexture texture); + + void SetUniformBuffer(int index, ShaderStage stage, BufferRange buffer); + + void SetVertexAttribs(VertexAttribDescriptor[] vertexAttribs); + void SetVertexBuffers(VertexBufferDescriptor[] vertexBuffers); + void SetViewports(int first, Viewport[] viewports); void TextureBarrier(); diff --git a/Ryujinx.Graphics.GAL/IRenderer.cs b/Ryujinx.Graphics.GAL/IRenderer.cs index ebe6785c..4f9e5bc9 100644 --- a/Ryujinx.Graphics.GAL/IRenderer.cs +++ b/Ryujinx.Graphics.GAL/IRenderer.cs @@ -1,5 +1,3 @@ -using Ryujinx.Graphics.GAL.Sampler; -using Ryujinx.Graphics.GAL.Texture; using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.GAL diff --git a/Ryujinx.Graphics.GAL/ITexture.cs b/Ryujinx.Graphics.GAL/ITexture.cs index 592c0482..7664f89c 100644 --- a/Ryujinx.Graphics.GAL/ITexture.cs +++ b/Ryujinx.Graphics.GAL/ITexture.cs @@ -1,4 +1,3 @@ -using Ryujinx.Graphics.GAL.Texture; using System; namespace Ryujinx.Graphics.GAL diff --git a/Ryujinx.Graphics.GAL/Sampler/MagFilter.cs b/Ryujinx.Graphics.GAL/MagFilter.cs index 3c9c9de6..f20d095e 100644 --- a/Ryujinx.Graphics.GAL/Sampler/MagFilter.cs +++ b/Ryujinx.Graphics.GAL/MagFilter.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Sampler +namespace Ryujinx.Graphics.GAL { public enum MagFilter { diff --git a/Ryujinx.Graphics.GAL/Sampler/MinFilter.cs b/Ryujinx.Graphics.GAL/MinFilter.cs index d012f695..b7a0740b 100644 --- a/Ryujinx.Graphics.GAL/Sampler/MinFilter.cs +++ b/Ryujinx.Graphics.GAL/MinFilter.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Sampler +namespace Ryujinx.Graphics.GAL { public enum MinFilter { diff --git a/Ryujinx.Graphics.GAL/Sampler/SamplerCreateInfo.cs b/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs index 3f42742b..33d80af5 100644 --- a/Ryujinx.Graphics.GAL/Sampler/SamplerCreateInfo.cs +++ b/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs @@ -1,6 +1,4 @@ -using Ryujinx.Graphics.GAL.Color; - -namespace Ryujinx.Graphics.GAL.Sampler +namespace Ryujinx.Graphics.GAL { public struct SamplerCreateInfo { diff --git a/Ryujinx.Graphics.GAL/DepthStencil/StencilOp.cs b/Ryujinx.Graphics.GAL/StencilOp.cs index 3818c6a5..f0ac829e 100644 --- a/Ryujinx.Graphics.GAL/DepthStencil/StencilOp.cs +++ b/Ryujinx.Graphics.GAL/StencilOp.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.DepthStencil +namespace Ryujinx.Graphics.GAL { public enum StencilOp { diff --git a/Ryujinx.Graphics.GAL/DepthStencil/StencilTestDescriptor.cs b/Ryujinx.Graphics.GAL/StencilTestDescriptor.cs index 2db53172..8c9d1644 100644 --- a/Ryujinx.Graphics.GAL/DepthStencil/StencilTestDescriptor.cs +++ b/Ryujinx.Graphics.GAL/StencilTestDescriptor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.DepthStencil +namespace Ryujinx.Graphics.GAL { public struct StencilTestDescriptor { diff --git a/Ryujinx.Graphics.GAL/Texture/SwizzleComponent.cs b/Ryujinx.Graphics.GAL/SwizzleComponent.cs index fd7d50e3..a405bd13 100644 --- a/Ryujinx.Graphics.GAL/Texture/SwizzleComponent.cs +++ b/Ryujinx.Graphics.GAL/SwizzleComponent.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Texture +namespace Ryujinx.Graphics.GAL { public enum SwizzleComponent { diff --git a/Ryujinx.Graphics.GAL/Texture/Target.cs b/Ryujinx.Graphics.GAL/Target.cs index b9cc1105..73f77f43 100644 --- a/Ryujinx.Graphics.GAL/Texture/Target.cs +++ b/Ryujinx.Graphics.GAL/Target.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.Texture +namespace Ryujinx.Graphics.GAL { public enum Target { diff --git a/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs b/Ryujinx.Graphics.GAL/TextureCreateInfo.cs index c6a73d91..8e8c5ff7 100644 --- a/Ryujinx.Graphics.GAL/Texture/TextureCreateInfo.cs +++ b/Ryujinx.Graphics.GAL/TextureCreateInfo.cs @@ -1,7 +1,7 @@ using Ryujinx.Common; using System; -namespace Ryujinx.Graphics.GAL.Texture +namespace Ryujinx.Graphics.GAL { public struct TextureCreateInfo { diff --git a/Ryujinx.Graphics.GAL/InputAssembler/VertexAttribDescriptor.cs b/Ryujinx.Graphics.GAL/VertexAttribDescriptor.cs index cba3a9a4..18774aae 100644 --- a/Ryujinx.Graphics.GAL/InputAssembler/VertexAttribDescriptor.cs +++ b/Ryujinx.Graphics.GAL/VertexAttribDescriptor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.InputAssembler +namespace Ryujinx.Graphics.GAL { public struct VertexAttribDescriptor { diff --git a/Ryujinx.Graphics.GAL/InputAssembler/VertexBufferDescriptor.cs b/Ryujinx.Graphics.GAL/VertexBufferDescriptor.cs index eb428f8e..bcd3b28f 100644 --- a/Ryujinx.Graphics.GAL/InputAssembler/VertexBufferDescriptor.cs +++ b/Ryujinx.Graphics.GAL/VertexBufferDescriptor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Graphics.GAL.InputAssembler +namespace Ryujinx.Graphics.GAL { public struct VertexBufferDescriptor { |
