StructuredProgramInfo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections.Generic;
  2. namespace Ryujinx.Graphics.Shader.StructuredIr
  3. {
  4. struct TransformFeedbackOutput
  5. {
  6. public readonly bool Valid;
  7. public readonly int Buffer;
  8. public readonly int Offset;
  9. public readonly int Stride;
  10. public TransformFeedbackOutput(int buffer, int offset, int stride)
  11. {
  12. Valid = true;
  13. Buffer = buffer;
  14. Offset = offset;
  15. Stride = stride;
  16. }
  17. }
  18. class StructuredProgramInfo
  19. {
  20. public List<StructuredFunction> Functions { get; }
  21. public HashSet<int> Inputs { get; }
  22. public HashSet<int> Outputs { get; }
  23. public HashSet<int> InputsPerPatch { get; }
  24. public HashSet<int> OutputsPerPatch { get; }
  25. public HelperFunctionsMask HelperFunctionsMask { get; set; }
  26. public TransformFeedbackOutput[] TransformFeedbackOutputs { get; }
  27. public StructuredProgramInfo()
  28. {
  29. Functions = new List<StructuredFunction>();
  30. Inputs = new HashSet<int>();
  31. Outputs = new HashSet<int>();
  32. InputsPerPatch = new HashSet<int>();
  33. OutputsPerPatch = new HashSet<int>();
  34. TransformFeedbackOutputs = new TransformFeedbackOutput[0xc0];
  35. }
  36. }
  37. }