Some code cleanup
This commit is contained in:
parent
af8498d679
commit
654e617fe7
60 changed files with 432 additions and 591 deletions
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Sampler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum AddressMode
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Blend
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct BlendDescriptor
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Blend
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum BlendFactor
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Blend
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum BlendOp
|
||||
{
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Color
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct ColorF
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Sampler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum CompareMode
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Texture
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum DepthStencilMode
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.DepthStencil
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct DepthStencilState
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.DepthStencil
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct DepthTestDescriptor
|
||||
{
|
|
@ -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();
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
using Ryujinx.Graphics.GAL.Sampler;
|
||||
using Ryujinx.Graphics.GAL.Texture;
|
||||
using Ryujinx.Graphics.Shader;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using Ryujinx.Graphics.GAL.Texture;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Sampler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum MagFilter
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Sampler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum MinFilter
|
||||
{
|
|
@ -1,6 +1,4 @@
|
|||
using Ryujinx.Graphics.GAL.Color;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL.Sampler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct SamplerCreateInfo
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.DepthStencil
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum StencilOp
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.DepthStencil
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct StencilTestDescriptor
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Texture
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum SwizzleComponent
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.Texture
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public enum Target
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL.Texture
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct TextureCreateInfo
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.InputAssembler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct VertexAttribDescriptor
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.Graphics.GAL.InputAssembler
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct VertexBufferDescriptor
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue