BufferTextureArrayBinding.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using Ryujinx.Graphics.GAL;
  2. using Ryujinx.Graphics.Gpu.Image;
  3. using Ryujinx.Memory.Range;
  4. namespace Ryujinx.Graphics.Gpu.Memory
  5. {
  6. /// <summary>
  7. /// A buffer binding to apply to a buffer texture array element.
  8. /// </summary>
  9. readonly struct BufferTextureArrayBinding<T>
  10. {
  11. /// <summary>
  12. /// Backend texture or image array.
  13. /// </summary>
  14. public T Array { get; }
  15. /// <summary>
  16. /// The buffer texture.
  17. /// </summary>
  18. public ITexture Texture { get; }
  19. /// <summary>
  20. /// Physical ranges of memory where the buffer texture data is located.
  21. /// </summary>
  22. public MultiRange Range { get; }
  23. /// <summary>
  24. /// The image or sampler binding info for the buffer texture.
  25. /// </summary>
  26. public TextureBindingInfo BindingInfo { get; }
  27. /// <summary>
  28. /// Index of the binding on the array.
  29. /// </summary>
  30. public int Index { get; }
  31. /// <summary>
  32. /// Create a new buffer texture binding.
  33. /// </summary>
  34. /// <param name="array">Array</param>
  35. /// <param name="texture">Buffer texture</param>
  36. /// <param name="range">Physical ranges of memory where the buffer texture data is located</param>
  37. /// <param name="bindingInfo">Binding info</param>
  38. /// <param name="index">Index of the binding on the array</param>
  39. public BufferTextureArrayBinding(
  40. T array,
  41. ITexture texture,
  42. MultiRange range,
  43. TextureBindingInfo bindingInfo,
  44. int index)
  45. {
  46. Array = array;
  47. Texture = texture;
  48. Range = range;
  49. BindingInfo = bindingInfo;
  50. Index = index;
  51. }
  52. }
  53. }