IPipeline.cs 4.0 KB

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