IPipeline.cs
1 using Ryujinx.Graphics.Shader; 2 using System; 3 4 namespace Ryujinx.Graphics.GAL 5 { 6 public interface IPipeline 7 { 8 void Barrier(); 9 10 void BeginTransformFeedback(PrimitiveTopology topology); 11 12 void ClearBuffer(BufferHandle destination, int offset, int size, uint value); 13 14 void ClearRenderTargetColor(int index, int layer, int layerCount, uint componentMask, ColorF color); 15 16 void ClearRenderTargetDepthStencil( 17 int layer, 18 int layerCount, 19 float depthValue, 20 bool depthMask, 21 int stencilValue, 22 int stencilMask); 23 24 void CommandBufferBarrier(); 25 26 void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size); 27 28 void DispatchCompute(int groupsX, int groupsY, int groupsZ); 29 30 void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance); 31 void DrawIndexed( 32 int indexCount, 33 int instanceCount, 34 int firstIndex, 35 int firstVertex, 36 int firstInstance); 37 void DrawIndexedIndirect(BufferRange indirectBuffer); 38 void DrawIndexedIndirectCount(BufferRange indirectBuffer, BufferRange parameterBuffer, int maxDrawCount, int stride); 39 void DrawIndirect(BufferRange indirectBuffer); 40 void DrawIndirectCount(BufferRange indirectBuffer, BufferRange parameterBuffer, int maxDrawCount, int stride); 41 void DrawTexture(ITexture texture, ISampler sampler, Extents2DF srcRegion, Extents2DF dstRegion); 42 43 void EndTransformFeedback(); 44 45 void SetAlphaTest(bool enable, float reference, CompareOp op); 46 47 void SetBlendState(AdvancedBlendDescriptor blend); 48 void SetBlendState(int index, BlendDescriptor blend); 49 50 void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp); 51 void SetDepthClamp(bool clamp); 52 void SetDepthMode(DepthMode mode); 53 void SetDepthTest(DepthTestDescriptor depthTest); 54 55 void SetFaceCulling(bool enable, Face face); 56 57 void SetFrontFace(FrontFace frontFace); 58 59 void SetIndexBuffer(BufferRange buffer, IndexType type); 60 61 void SetImage(ShaderStage stage, int binding, ITexture texture); 62 void SetImageArray(ShaderStage stage, int binding, IImageArray array); 63 void SetImageArraySeparate(ShaderStage stage, int setIndex, IImageArray array); 64 65 void SetLineParameters(float width, bool smooth); 66 67 void SetLogicOpState(bool enable, LogicalOp op); 68 69 void SetMultisampleState(MultisampleDescriptor multisample); 70 71 void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel); 72 void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin); 73 74 void SetPolygonMode(PolygonMode frontMode, PolygonMode backMode); 75 76 void SetPrimitiveRestart(bool enable, int index); 77 78 void SetPrimitiveTopology(PrimitiveTopology topology); 79 80 void SetProgram(IProgram program); 81 82 void SetRasterizerDiscard(bool discard); 83 84 void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask); 85 void SetRenderTargets(ITexture[] colors, ITexture depthStencil); 86 87 void SetScissors(ReadOnlySpan<Rectangle<int>> regions); 88 89 void SetStencilTest(StencilTestDescriptor stencilTest); 90 91 void SetStorageBuffers(ReadOnlySpan<BufferAssignment> buffers); 92 93 void SetTextureAndSampler(ShaderStage stage, int binding, ITexture texture, ISampler sampler); 94 void SetTextureArray(ShaderStage stage, int binding, ITextureArray array); 95 void SetTextureArraySeparate(ShaderStage stage, int setIndex, ITextureArray array); 96 97 void SetTransformFeedbackBuffers(ReadOnlySpan<BufferRange> buffers); 98 void SetUniformBuffers(ReadOnlySpan<BufferAssignment> buffers); 99 100 void SetUserClipDistance(int index, bool enableClip); 101 102 void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs); 103 void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers); 104 105 void SetViewports(ReadOnlySpan<Viewport> viewports); 106 107 void TextureBarrier(); 108 void TextureBarrierTiled(); 109 110 bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual); 111 bool TryHostConditionalRendering(ICounterEvent value, ICounterEvent compare, bool isEqual); 112 void EndHostConditionalRendering(); 113 } 114 }