AstTextureOperation.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Ryujinx.Graphics.Shader.IntermediateRepresentation;
  2. namespace Ryujinx.Graphics.Shader.StructuredIr
  3. {
  4. class AstTextureOperation : AstOperation
  5. {
  6. public SamplerType Type { get; }
  7. public TextureFormat Format { get; }
  8. public TextureFlags Flags { get; }
  9. public int CbufSlot { get; }
  10. public int Handle { get; }
  11. public AstTextureOperation(
  12. Instruction inst,
  13. SamplerType type,
  14. TextureFormat format,
  15. TextureFlags flags,
  16. int cbufSlot,
  17. int handle,
  18. int index,
  19. params IAstNode[] sources) : base(inst, index, sources, sources.Length)
  20. {
  21. Type = type;
  22. Format = format;
  23. Flags = flags;
  24. CbufSlot = cbufSlot;
  25. Handle = handle;
  26. }
  27. public AstTextureOperation WithType(SamplerType type)
  28. {
  29. return new AstTextureOperation(Inst, type, Format, Flags, CbufSlot, Handle, Index);
  30. }
  31. }
  32. }