IPipeline.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 CommandBufferBarrier();
  17. void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size);
  18. void DispatchCompute(int groupsX, int groupsY, int groupsZ);
  19. void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance);
  20. void DrawIndexed(
  21. int indexCount,
  22. int instanceCount,
  23. int firstIndex,
  24. int firstVertex,
  25. int firstInstance);
  26. void EndTransformFeedback();
  27. void MultiDrawIndirectCount(BufferRange indirectBuffer, BufferRange parameterBuffer, int maxDrawCount, int stride);
  28. void MultiDrawIndexedIndirectCount(BufferRange indirectBuffer, BufferRange parameterBuffer, int maxDrawCount, int stride);
  29. void SetAlphaTest(bool enable, float reference, CompareOp op);
  30. void SetBlendState(int index, BlendDescriptor blend);
  31. void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp);
  32. void SetDepthClamp(bool clamp);
  33. void SetDepthMode(DepthMode mode);
  34. void SetDepthTest(DepthTestDescriptor depthTest);
  35. void SetFaceCulling(bool enable, Face face);
  36. void SetFrontFace(FrontFace frontFace);
  37. void SetIndexBuffer(BufferRange buffer, IndexType type);
  38. void SetImage(int binding, ITexture texture, Format imageFormat);
  39. void SetLineParameters(float width, bool smooth);
  40. void SetLogicOpState(bool enable, LogicalOp op);
  41. void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel);
  42. void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin);
  43. void SetPolygonMode(PolygonMode frontMode, PolygonMode backMode);
  44. void SetPrimitiveRestart(bool enable, int index);
  45. void SetPrimitiveTopology(PrimitiveTopology topology);
  46. void SetProgram(IProgram program);
  47. void SetRasterizerDiscard(bool discard);
  48. void SetRenderTargetScale(float scale);
  49. void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
  50. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  51. void SetSampler(int binding, ISampler sampler);
  52. void SetScissor(int index, bool enable, int x, int y, int width, int height);
  53. void SetStencilTest(StencilTestDescriptor stencilTest);
  54. void SetStorageBuffers(int first, ReadOnlySpan<BufferRange> buffers);
  55. void SetTexture(int binding, ITexture texture);
  56. void SetTransformFeedbackBuffers(ReadOnlySpan<BufferRange> buffers);
  57. void SetUniformBuffers(int first, ReadOnlySpan<BufferRange> buffers);
  58. void SetUserClipDistance(int index, bool enableClip);
  59. void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs);
  60. void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers);
  61. void SetViewports(int first, ReadOnlySpan<Viewport> viewports);
  62. void TextureBarrier();
  63. void TextureBarrierTiled();
  64. bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual);
  65. bool TryHostConditionalRendering(ICounterEvent value, ICounterEvent compare, bool isEqual);
  66. void EndHostConditionalRendering();
  67. void UpdateRenderScale(ShaderStage stage, ReadOnlySpan<float> scales, int textureCount, int imageCount);
  68. }
  69. }