IPipeline.cs 3.0 KB

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