diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-15 23:15:13 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:31 +0200 |
commit | 31d402ee74d7f7045aec7e748fdee489a434db6b (patch) | |
tree | 2cc89d8b24d856e2af92be0a1a1948329b92dd01 /src/shader_recompiler/backend/glasm/reg_alloc.h | |
parent | glasm: Add graphics specific shader declarations to GLASM (diff) | |
download | yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar.gz yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar.bz2 yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar.lz yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar.xz yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.tar.zst yuzu-31d402ee74d7f7045aec7e748fdee489a434db6b.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm/reg_alloc.h')
-rw-r--r-- | src/shader_recompiler/backend/glasm/reg_alloc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h index 5742436cf..ede6edd1f 100644 --- a/src/shader_recompiler/backend/glasm/reg_alloc.h +++ b/src/shader_recompiler/backend/glasm/reg_alloc.h @@ -23,6 +23,7 @@ namespace Shader::Backend::GLASM { class EmitContext; enum class Type : u32 { + Void, Register, U32, S32, @@ -65,6 +66,8 @@ struct Value { return false; } switch (type) { + case Type::Void: + return true; case Type::Register: return id == rhs.id; case Type::U32: @@ -218,6 +221,8 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarU32> { template <typename FormatContext> auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) { switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; case Shader::Backend::GLASM::Type::Register: return Shader::Backend::GLASM::FormatTo<true>(ctx, value.id); case Shader::Backend::GLASM::Type::U32: @@ -242,6 +247,8 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarS32> { template <typename FormatContext> auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) { switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; case Shader::Backend::GLASM::Type::Register: return Shader::Backend::GLASM::FormatTo<true>(ctx, value.id); case Shader::Backend::GLASM::Type::U32: @@ -266,6 +273,8 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF32> { template <typename FormatContext> auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) { switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; case Shader::Backend::GLASM::Type::Register: return Shader::Backend::GLASM::FormatTo<true>(ctx, value.id); case Shader::Backend::GLASM::Type::U32: @@ -290,6 +299,8 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF64> { template <typename FormatContext> auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) { switch (value.type) { + case Shader::Backend::GLASM::Type::Void: + break; case Shader::Backend::GLASM::Type::Register: return Shader::Backend::GLASM::FormatTo<true>(ctx, value.id); case Shader::Backend::GLASM::Type::U32: |