IPipeline.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 SetOrigin(Origin origin);
  33. void SetPointSize(float size);
  34. void SetPrimitiveRestart(bool enable, int index);
  35. void SetPrimitiveTopology(PrimitiveTopology topology);
  36. void SetProgram(IProgram program);
  37. void SetRasterizerDiscard(bool discard);
  38. void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
  39. void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
  40. void SetSampler(int index, ShaderStage stage, ISampler sampler);
  41. void SetScissorEnable(int index, bool enable);
  42. void SetScissor(int index, int x, int y, int width, int height);
  43. void SetStencilTest(StencilTestDescriptor stencilTest);
  44. void SetStorageBuffer(int index, ShaderStage stage, BufferRange buffer);
  45. void SetTexture(int index, ShaderStage stage, ITexture texture);
  46. void SetUniformBuffer(int index, ShaderStage stage, BufferRange buffer);
  47. void SetUserClipDistance(int index, bool enableClip);
  48. void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs);
  49. void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers);
  50. void SetViewports(int first, ReadOnlySpan<Viewport> viewports);
  51. void TextureBarrier();
  52. void TextureBarrierTiled();
  53. bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual);
  54. bool TryHostConditionalRendering(ICounterEvent value, ICounterEvent compare, bool isEqual);
  55. void EndHostConditionalRendering();
  56. }
  57. }