TextureDependency.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. namespace Ryujinx.Graphics.Gpu.Image
  2. {
  3. /// <summary>
  4. /// One side of a two-way dependency between one texture view and another.
  5. /// Contains a reference to the handle owning the dependency, and the other dependency.
  6. /// </summary>
  7. class TextureDependency
  8. {
  9. /// <summary>
  10. /// The handle that owns this dependency.
  11. /// </summary>
  12. public TextureGroupHandle Handle;
  13. /// <summary>
  14. /// The other dependency linked to this one, which belongs to another handle.
  15. /// </summary>
  16. public TextureDependency Other;
  17. /// <summary>
  18. /// Create a new texture dependency.
  19. /// </summary>
  20. /// <param name="handle">The handle that owns the dependency</param>
  21. public TextureDependency(TextureGroupHandle handle)
  22. {
  23. Handle = handle;
  24. }
  25. /// <summary>
  26. /// Signal that the owner of this dependency has been modified,
  27. /// meaning that the other dependency's handle must defer a copy from it.
  28. /// </summary>
  29. public void SignalModified()
  30. {
  31. Other.Handle.DeferCopy(Handle);
  32. }
  33. }
  34. }