IGraphicsPipeline.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Ryujinx.Graphics.GAL.Blend;
  2. using Ryujinx.Graphics.GAL.Color;
  3. using Ryujinx.Graphics.GAL.DepthStencil;
  4. using Ryujinx.Graphics.GAL.InputAssembler;
  5. using Ryujinx.Graphics.Shader;
  6. namespace Ryujinx.Graphics.GAL
  7. {
  8. public interface IGraphicsPipeline
  9. {
  10. void BindBlendState(int index, BlendDescriptor blend);
  11. void BindIndexBuffer(BufferRange buffer, IndexType type);
  12. void BindProgram(IProgram program);
  13. void BindSampler(int index, ShaderStage stage, ISampler sampler);
  14. void BindTexture(int index, ShaderStage stage, ITexture texture);
  15. void BindStorageBuffers(int index, ShaderStage stage, BufferRange[] buffers);
  16. void BindUniformBuffers(int index, ShaderStage stage, BufferRange[] buffers);
  17. void BindVertexAttribs(VertexAttribDescriptor[] vertexAttribs);
  18. void BindVertexBuffers(VertexBufferDescriptor[] vertexBuffers);
  19. void ClearRenderTargetColor(int index, uint componentMask, ColorF color);
  20. void ClearRenderTargetColor(int index, uint componentMask, ColorSI color);
  21. void ClearRenderTargetColor(int index, uint componentMask, ColorUI color);
  22. void ClearRenderTargetDepthStencil(
  23. float depthValue,
  24. bool depthMask,
  25. int stencilValue,
  26. int stencilMask);
  27. void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance);
  28. void DrawIndexed(
  29. int indexCount,
  30. int instanceCount,
  31. int firstIndex,
  32. int firstVertex,
  33. int firstInstance);
  34. void DrawIndirect (BufferRange buffer, ulong offset, int drawCount, int stride);
  35. void DrawIndexedIndirect(BufferRange buffer, ulong offset, int drawCount, int stride);
  36. void SetBlendColor(ColorF color);
  37. void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp);
  38. void SetDepthTest(DepthTestDescriptor depthTest);
  39. void SetFaceCulling(bool enable, Face face);
  40. void SetFrontFace(FrontFace frontFace);
  41. void SetPrimitiveRestart(bool enable, int index);
  42. void SetPrimitiveTopology(PrimitiveTopology topology);
  43. void SetRenderTargetColorMasks(uint[] componentMask);
  44. void SetRenderTargets(ITexture color3D, ITexture depthStencil);
  45. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  46. void SetStencilTest(StencilTestDescriptor stencilTest);
  47. void SetViewports(int first, Viewport[] viewports);
  48. }
  49. }