diff options
Diffstat (limited to 'src/shader_recompiler/frontend')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/attribute.cpp | 18 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/attribute.h | 7 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/shader_recompiler/frontend/ir/attribute.cpp b/src/shader_recompiler/frontend/ir/attribute.cpp index 5b3694f65..4d0b8b8e5 100644 --- a/src/shader_recompiler/frontend/ir/attribute.cpp +++ b/src/shader_recompiler/frontend/ir/attribute.cpp | |||
| @@ -9,24 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | namespace Shader::IR { | 10 | namespace Shader::IR { |
| 11 | 11 | ||
| 12 | bool IsFixedFncTexture(Attribute attribute) { | ||
| 13 | return attribute >= Attribute::FixedFncTexture0S && attribute <= Attribute::FixedFncTexture9Q; | ||
| 14 | } | ||
| 15 | |||
| 16 | u32 FixedFncTextureAttributeIndex(Attribute attribute) { | ||
| 17 | if (!IsFixedFncTexture(attribute)) { | ||
| 18 | throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute); | ||
| 19 | } | ||
| 20 | return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::FixedFncTexture0S)) / 4u; | ||
| 21 | } | ||
| 22 | |||
| 23 | u32 FixedFncTextureAttributeElement(Attribute attribute) { | ||
| 24 | if (!IsFixedFncTexture(attribute)) { | ||
| 25 | throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute); | ||
| 26 | } | ||
| 27 | return static_cast<u32>(attribute) % 4; | ||
| 28 | } | ||
| 29 | |||
| 30 | bool IsGeneric(Attribute attribute) noexcept { | 12 | bool IsGeneric(Attribute attribute) noexcept { |
| 31 | return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X; | 13 | return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X; |
| 32 | } | 14 | } |
diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h index 9ca4dd76e..ca1199494 100644 --- a/src/shader_recompiler/frontend/ir/attribute.h +++ b/src/shader_recompiler/frontend/ir/attribute.h | |||
| @@ -222,15 +222,8 @@ enum class Attribute : u64 { | |||
| 222 | FrontFace = 255, | 222 | FrontFace = 255, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | constexpr size_t NUM_FIXEDFNCTEXTURE = 10; | ||
| 226 | constexpr size_t NUM_GENERICS = 32; | 225 | constexpr size_t NUM_GENERICS = 32; |
| 227 | 226 | ||
| 228 | [[nodiscard]] bool IsFixedFncTexture(Attribute attribute); | ||
| 229 | |||
| 230 | [[nodiscard]] u32 FixedFncTextureAttributeIndex(Attribute attribute); | ||
| 231 | |||
| 232 | [[nodiscard]] u32 FixedFncTextureAttributeElement(Attribute attribute); | ||
| 233 | |||
| 234 | [[nodiscard]] bool IsGeneric(Attribute attribute) noexcept; | 227 | [[nodiscard]] bool IsGeneric(Attribute attribute) noexcept; |
| 235 | 228 | ||
| 236 | [[nodiscard]] u32 GenericAttributeIndex(Attribute attribute); | 229 | [[nodiscard]] u32 GenericAttributeIndex(Attribute attribute); |