IPipeline.cs 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin);
  38. void SetPrimitiveRestart(bool enable, int index);
  39. void SetPrimitiveTopology(PrimitiveTopology topology);
  40. void SetProgram(IProgram program);
  41. void SetRasterizerDiscard(bool discard);
  42. void SetRenderTargetScale(float scale);
  43. void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
  44. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  45. void SetSampler(int binding, ISampler sampler);
  46. void SetScissor(int index, bool enable, int x, int y, int width, int height);
  47. void SetStencilTest(StencilTestDescriptor stencilTest);
  48. void SetStorageBuffers(ReadOnlySpan<BufferRange> buffers);
  49. void SetTexture(int binding, ITexture texture);
  50. void SetTransformFeedbackBuffers(ReadOnlySpan<BufferRange> buffers);
  51. void SetUniformBuffers(ReadOnlySpan<BufferRange> buffers);
  52. void SetUserClipDistance(int index, bool enableClip);
  53. void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs);
  54. void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers);
  55. void SetViewports(int first, ReadOnlySpan<Viewport> viewports);
  56. void TextureBarrier();
  57. void TextureBarrierTiled();
  58. bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual);
  59. bool TryHostConditionalRendering(ICounterEvent value, ICounterEvent compare, bool isEqual);
  60. void EndHostConditionalRendering();
  61. void UpdateRenderScale(ShaderStage stage, float[] scales, int textureCount, int imageCount);
  62. }
  63. }