IPipeline.cs 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 ClearRenderTargetColor(int index, uint componentMask, ColorF color);
  10. void ClearRenderTargetDepthStencil(
  11. float depthValue,
  12. bool depthMask,
  13. int stencilValue,
  14. int stencilMask);
  15. void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size);
  16. void DispatchCompute(int groupsX, int groupsY, int groupsZ);
  17. void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance);
  18. void DrawIndexed(
  19. int indexCount,
  20. int instanceCount,
  21. int firstIndex,
  22. int firstVertex,
  23. int firstInstance);
  24. void EndTransformFeedback();
  25. void SetAlphaTest(bool enable, float reference, CompareOp op);
  26. void SetBlendState(int index, BlendDescriptor blend);
  27. void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp);
  28. void SetDepthClamp(bool clamp);
  29. void SetDepthMode(DepthMode mode);
  30. void SetDepthTest(DepthTestDescriptor depthTest);
  31. void SetFaceCulling(bool enable, Face face);
  32. void SetFrontFace(FrontFace frontFace);
  33. void SetIndexBuffer(BufferRange buffer, IndexType type);
  34. void SetImage(int index, ShaderStage stage, ITexture texture, Format imageFormat);
  35. void SetLogicOpState(bool enable, LogicalOp op);
  36. void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin);
  37. void SetPrimitiveRestart(bool enable, int index);
  38. void SetPrimitiveTopology(PrimitiveTopology topology);
  39. void SetProgram(IProgram program);
  40. void SetRasterizerDiscard(bool discard);
  41. void SetRenderTargetScale(float scale);
  42. void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
  43. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  44. void SetSampler(int index, ShaderStage stage, ISampler sampler);
  45. void SetScissorEnable(int index, bool enable);
  46. void SetScissor(int index, int x, int y, int width, int height);
  47. void SetStencilTest(StencilTestDescriptor stencilTest);
  48. void SetStorageBuffer(int index, ShaderStage stage, BufferRange buffer);
  49. void SetTexture(int index, ShaderStage stage, ITexture texture);
  50. void SetTransformFeedbackBuffers(ReadOnlySpan<BufferRange> buffers);
  51. void SetUniformBuffer(int index, ShaderStage stage, BufferRange buffer);
  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, int textureCount);
  62. }
  63. }