summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/attribute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/attribute.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/attribute.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/attribute.cpp b/src/shader_recompiler/frontend/ir/attribute.cpp
index 4d0b8b8e5..dc2bec06d 100644
--- a/src/shader_recompiler/frontend/ir/attribute.cpp
+++ b/src/shader_recompiler/frontend/ir/attribute.cpp
@@ -9,6 +9,14 @@
9 9
10namespace Shader::IR { 10namespace Shader::IR {
11 11
12u32 TxtCoordAttributeIndex(Attribute attribute) {
13 return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::FixedFncTexture0S)) / 4u;
14}
15
16u32 TxtCoordAttributeElement(Attribute attribute) {
17 return static_cast<u32>(attribute) % 4;
18}
19
12bool IsGeneric(Attribute attribute) noexcept { 20bool IsGeneric(Attribute attribute) noexcept {
13 return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X; 21 return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X;
14} 22}