CompileShaderCommand.cs 695 B

12345678910111213141516171819202122
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
  4. {
  5. struct CompileShaderCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.CompileShader;
  8. private TableRef<ThreadedShader> _shader;
  9. public void Set(TableRef<ThreadedShader> shader)
  10. {
  11. _shader = shader;
  12. }
  13. public static void Run(ref CompileShaderCommand command, ThreadedRenderer threaded, IRenderer renderer)
  14. {
  15. ThreadedShader shader = command._shader.Get(threaded);
  16. shader.EnsureCreated();
  17. }
  18. }
  19. }