1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
namespace Ryujinx.Graphics.Shader.StructuredIr
{
class AstTextureOperation : AstOperation
{
public SamplerType Type { get; }
public TextureFormat Format { get; }
public TextureFlags Flags { get; }
public int Set { get; }
public int Binding { get; }
public int SamplerSet { get; }
public int SamplerBinding { get; }
public bool IsSeparate => SamplerBinding >= 0;
public AstTextureOperation(
Instruction inst,
SamplerType type,
TextureFormat format,
TextureFlags flags,
int set,
int binding,
int samplerSet,
int samplerBinding,
int index,
params IAstNode[] sources) : base(inst, StorageKind.None, false, index, sources, sources.Length)
{
Type = type;
Format = format;
Flags = flags;
Set = set;
Binding = binding;
SamplerSet = samplerSet;
SamplerBinding = samplerBinding;
}
public SetBindingPair GetTextureSetAndBinding()
{
return new SetBindingPair(Set, Binding);
}
public SetBindingPair GetSamplerSetAndBinding()
{
return new SetBindingPair(SamplerSet, SamplerBinding);
}
}
}
|