TextureReleaseCommand.cs 695 B

123456789101112131415161718192021
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
  4. {
  5. struct TextureReleaseCommand : IGALCommand, IGALCommand<TextureReleaseCommand>
  6. {
  7. public CommandType CommandType => CommandType.TextureRelease;
  8. private TableRef<ThreadedTexture> _texture;
  9. public void Set(TableRef<ThreadedTexture> texture)
  10. {
  11. _texture = texture;
  12. }
  13. public static void Run(ref TextureReleaseCommand command, ThreadedRenderer threaded, IRenderer renderer)
  14. {
  15. command._texture.Get(threaded).Base.Release();
  16. }
  17. }
  18. }