BufferTextureBinding.cs
1 using Ryujinx.Graphics.GAL; 2 using Ryujinx.Graphics.Gpu.Image; 3 using Ryujinx.Graphics.Shader; 4 using Ryujinx.Memory.Range; 5 6 namespace Ryujinx.Graphics.Gpu.Memory 7 { 8 /// <summary> 9 /// A buffer binding to apply to a buffer texture. 10 /// </summary> 11 readonly struct BufferTextureBinding 12 { 13 /// <summary> 14 /// Shader stage accessing the texture. 15 /// </summary> 16 public ShaderStage Stage { get; } 17 18 /// <summary> 19 /// The buffer texture. 20 /// </summary> 21 public ITexture Texture { get; } 22 23 /// <summary> 24 /// Physical ranges of memory where the buffer texture data is located. 25 /// </summary> 26 public MultiRange Range { get; } 27 28 /// <summary> 29 /// The image or sampler binding info for the buffer texture. 30 /// </summary> 31 public TextureBindingInfo BindingInfo { get; } 32 33 /// <summary> 34 /// Whether the binding is for an image or a sampler. 35 /// </summary> 36 public bool IsImage { get; } 37 38 /// <summary> 39 /// Create a new buffer texture binding. 40 /// </summary> 41 /// <param name="stage">Shader stage accessing the texture</param> 42 /// <param name="texture">Buffer texture</param> 43 /// <param name="range">Physical ranges of memory where the buffer texture data is located</param> 44 /// <param name="bindingInfo">Binding info</param> 45 /// <param name="isImage">Whether the binding is for an image or a sampler</param> 46 public BufferTextureBinding( 47 ShaderStage stage, 48 ITexture texture, 49 MultiRange range, 50 TextureBindingInfo bindingInfo, 51 bool isImage) 52 { 53 Stage = stage; 54 Texture = texture; 55 Range = range; 56 BindingInfo = bindingInfo; 57 IsImage = isImage; 58 } 59 } 60 }