summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorFeng Chen <vonchenplus@gmail.com>2021-09-07 06:34:35 +0200
committerFeng Chen <vonchenplus@gmail.com>2021-09-07 06:34:35 +0200
commit9cdf2383e99fac2110d788da070f16b2b5c678e7 (patch)
treea4857abbacebf3659e6b5c647eceb5a64146a26b /src/shader_recompiler/frontend/ir
parentDynamic get unused location (diff)
downloadyuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.gz
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.bz2
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.lz
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.xz
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.zst
yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/attribute.cpp18
-rw-r--r--src/shader_recompiler/frontend/ir/attribute.h7
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 @@
namespace Shader::IR {
-bool IsFixedFncTexture(Attribute attribute) {
- return attribute >= Attribute::FixedFncTexture0S && attribute <= Attribute::FixedFncTexture9Q;
-}
-
-u32 FixedFncTextureAttributeIndex(Attribute attribute) {
- if (!IsFixedFncTexture(attribute)) {
- throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute);
- }
- return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::FixedFncTexture0S)) / 4u;
-}
-
-u32 FixedFncTextureAttributeElement(Attribute attribute) {
- if (!IsFixedFncTexture(attribute)) {
- throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute);
- }
- return static_cast<u32>(attribute) % 4;
-}
-
bool IsGeneric(Attribute attribute) noexcept {
return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X;
}
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 {
FrontFace = 255,
};
-constexpr size_t NUM_FIXEDFNCTEXTURE = 10;
constexpr size_t NUM_GENERICS = 32;
-[[nodiscard]] bool IsFixedFncTexture(Attribute attribute);
-
-[[nodiscard]] u32 FixedFncTextureAttributeIndex(Attribute attribute);
-
-[[nodiscard]] u32 FixedFncTextureAttributeElement(Attribute attribute);
-
[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept;
[[nodiscard]] u32 GenericAttributeIndex(Attribute attribute);