summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-06-24 07:41:09 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:39 +0200
commit7dafa96ab59892b7f1fbffdb61e4326e6443955f (patch)
tree5ab58d56860db635542ea1ec24be258bd86b40b9 /src/shader_recompiler/frontend/ir
parentvk_graphics_pipeline: Implement conservative rendering (diff)
downloadyuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.gz
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.bz2
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.lz
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.xz
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.tar.zst
yuzu-7dafa96ab59892b7f1fbffdb61e4326e6443955f.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/frontend/ir/attribute.h6
-rw-r--r--src/shader_recompiler/frontend/ir/program.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h
index 8bf2ddf30..ca1199494 100644
--- a/src/shader_recompiler/frontend/ir/attribute.h
+++ b/src/shader_recompiler/frontend/ir/attribute.h
@@ -222,6 +222,8 @@ enum class Attribute : u64 {
FrontFace = 255,
};
+constexpr size_t NUM_GENERICS = 32;
+
[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept;
[[nodiscard]] u32 GenericAttributeIndex(Attribute attribute);
@@ -230,6 +232,10 @@ enum class Attribute : u64 {
[[nodiscard]] std::string NameOf(Attribute attribute);
+[[nodiscard]] constexpr IR::Attribute operator+(IR::Attribute attribute, size_t value) noexcept {
+ return static_cast<IR::Attribute>(static_cast<size_t>(attribute) + value);
+}
+
} // namespace Shader::IR
template <>
diff --git a/src/shader_recompiler/frontend/ir/program.h b/src/shader_recompiler/frontend/ir/program.h
index 9ede5b48d..ebcaa8bc2 100644
--- a/src/shader_recompiler/frontend/ir/program.h
+++ b/src/shader_recompiler/frontend/ir/program.h
@@ -27,6 +27,7 @@ struct Program {
u32 invocations{};
u32 local_memory_size{};
u32 shared_memory_size{};
+ bool is_geometry_passthrough{};
};
[[nodiscard]] std::string DumpProgram(const Program& program);