BufferTextureBinding.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Ryujinx.Graphics.GAL;
  2. using Ryujinx.Graphics.Gpu.Image;
  3. namespace Ryujinx.Graphics.Gpu.Memory
  4. {
  5. /// <summary>
  6. /// A buffer binding to apply to a buffer texture.
  7. /// </summary>
  8. struct BufferTextureBinding
  9. {
  10. /// <summary>
  11. /// The buffer texture.
  12. /// </summary>
  13. public ITexture Texture { get; }
  14. /// <summary>
  15. /// The base address of the buffer binding.
  16. /// </summary>
  17. public ulong Address { get; }
  18. /// <summary>
  19. /// The size of the buffer binding in bytes.
  20. /// </summary>
  21. public ulong Size { get; }
  22. /// <summary>
  23. /// The image or sampler binding info for the buffer texture.
  24. /// </summary>
  25. public TextureBindingInfo BindingInfo { get; }
  26. /// <summary>
  27. /// The image format for the binding.
  28. /// </summary>
  29. public Format Format { get; }
  30. /// <summary>
  31. /// Whether the binding is for an image or a sampler.
  32. /// </summary>
  33. public bool IsImage { get; }
  34. /// <summary>
  35. /// Create a new buffer texture binding.
  36. /// </summary>
  37. /// <param name="texture">Buffer texture</param>
  38. /// <param name="address">Base address</param>
  39. /// <param name="size">Size in bytes</param>
  40. /// <param name="bindingInfo">Binding info</param>
  41. /// <param name="format">Binding format</param>
  42. /// <param name="isImage">Whether the binding is for an image or a sampler</param>
  43. public BufferTextureBinding(ITexture texture, ulong address, ulong size, TextureBindingInfo bindingInfo, Format format, bool isImage)
  44. {
  45. Texture = texture;
  46. Address = address;
  47. Size = size;
  48. BindingInfo = bindingInfo;
  49. Format = format;
  50. IsImage = isImage;
  51. }
  52. }
  53. }