ShaderState.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. namespace Ryujinx.Graphics.Gpu.State
  2. {
  3. /// <summary>
  4. /// Graphics shader stage state.
  5. /// </summary>
  6. struct ShaderState
  7. {
  8. public uint Control;
  9. public uint Offset;
  10. public uint Unknown0x8;
  11. public int MaxRegisters;
  12. public ShaderType Type;
  13. public uint Unknown0x14;
  14. public uint Unknown0x18;
  15. public uint Unknown0x1c;
  16. public uint Unknown0x20;
  17. public uint Unknown0x24;
  18. public uint Unknown0x28;
  19. public uint Unknown0x2c;
  20. public uint Unknown0x30;
  21. public uint Unknown0x34;
  22. public uint Unknown0x38;
  23. public uint Unknown0x3c;
  24. /// <summary>
  25. /// Unpacks shader enable information.
  26. /// Must be ignored for vertex shaders, those are always enabled.
  27. /// </summary>
  28. /// <returns>True if the stage is enabled, false otherwise</returns>
  29. public bool UnpackEnable()
  30. {
  31. return (Control & 1) != 0;
  32. }
  33. }
  34. }