ShaderDecodeFlow.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper;
  3. namespace Ryujinx.Graphics.Gal.Shader
  4. {
  5. static partial class ShaderDecode
  6. {
  7. public static void Bra(ShaderIrBlock Block, long OpCode)
  8. {
  9. if ((OpCode & 0x20) != 0)
  10. {
  11. //This reads the target offset from the constant buffer.
  12. //Almost impossible to support with GLSL.
  13. throw new NotImplementedException();
  14. }
  15. int Target = ((int)(OpCode >> 20) << 8) >> 8;
  16. ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
  17. Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm), OpCode));
  18. }
  19. public static void Exit(ShaderIrBlock Block, long OpCode)
  20. {
  21. Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Exit), OpCode));
  22. }
  23. public static void Kil(ShaderIrBlock Block, long OpCode)
  24. {
  25. Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Kil), OpCode));
  26. }
  27. }
  28. }