IPipeline.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using Ryujinx.Graphics.Shader;
  2. using System;
  3. namespace Ryujinx.Graphics.GAL
  4. {
  5. public interface IPipeline
  6. {
  7. void Barrier();
  8. void BeginTransformFeedback(PrimitiveTopology topology);
  9. void ClearBuffer(BufferHandle destination, int offset, int size, uint value);
  10. void ClearRenderTargetColor(int index, uint componentMask, ColorF color);
  11. void ClearRenderTargetDepthStencil(
  12. float depthValue,
  13. bool depthMask,
  14. int stencilValue,
  15. int stencilMask);
  16. void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size);
  17. void DispatchCompute(int groupsX, int groupsY, int groupsZ);
  18. void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance);
  19. void DrawIndexed(
  20. int indexCount,
  21. int instanceCount,
  22. int firstIndex,
  23. int firstVertex,
  24. int firstInstance);
  25. void EndTransformFeedback();
  26. void SetAlphaTest(bool enable, float reference, CompareOp op);
  27. void SetBlendState(int index, BlendDescriptor blend);
  28. void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp);
  29. void SetDepthClamp(bool clamp);
  30. void SetDepthMode(DepthMode mode);
  31. void SetDepthTest(DepthTestDescriptor depthTest);
  32. void SetFaceCulling(bool enable, Face face);
  33. void SetFrontFace(FrontFace frontFace);
  34. void SetIndexBuffer(BufferRange buffer, IndexType type);
  35. void SetImage(int binding, ITexture texture, Format imageFormat);
  36. void SetLogicOpState(bool enable, LogicalOp op);
  37. void SetLineParameters(float width, bool smooth);
  38. void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin);
  39. void SetPrimitiveRestart(bool enable, int index);
  40. void SetPrimitiveTopology(PrimitiveTopology topology);
  41. void SetProgram(IProgram program);
  42. void SetRasterizerDiscard(bool discard);
  43. void SetRenderTargetScale(float scale);
  44. void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
  45. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  46. void SetSampler(int binding, ISampler sampler);
  47. void SetScissor(int index, bool enable, int x, int y, int width, int height);
  48. void SetStencilTest(StencilTestDescriptor stencilTest);
  49. void SetStorageBuffers(ReadOnlySpan<BufferRange> buffers);
  50. void SetTexture(int binding, ITexture texture);
  51. void SetTransformFeedbackBuffers(ReadOnlySpan<BufferRange> buffers);
  52. void SetUniformBuffers(ReadOnlySpan<BufferRange> buffers);
  53. void SetUserClipDistance(int index, bool enableClip);
  54. void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs);
  55. void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers);
  56. void SetViewports(int first, ReadOnlySpan<Viewport> viewports);
  57. void TextureBarrier();
  58. void TextureBarrierTiled();
  59. bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual);
  60. bool TryHostConditionalRendering(ICounterEvent value, ICounterEvent compare, bool isEqual);
  61. void EndHostConditionalRendering();
  62. void UpdateRenderScale(ShaderStage stage, float[] scales, int textureCount, int imageCount);
  63. }
  64. }