diff options
| author | 2021-05-22 02:32:57 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | 65c6f73e436ba3116030277a7a8bcb563f9554e2 (patch) | |
| tree | 379f8ed7647aa543e54ef953cc39d761b85c192e /src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp | |
| parent | glsl: Add many FP32/64 instructions (diff) | |
| download | yuzu-65c6f73e436ba3116030277a7a8bcb563f9554e2.tar.gz yuzu-65c6f73e436ba3116030277a7a8bcb563f9554e2.tar.xz yuzu-65c6f73e436ba3116030277a7a8bcb563f9554e2.zip | |
glsl: More FP instructions/fixes
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp index e69de29bb..e4781c03c 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glsl/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | #include "shader_recompiler/profile.h" | ||
| 11 | |||
| 12 | namespace Shader::Backend::GLSL { | ||
| 13 | |||
| 14 | void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 15 | ctx.AddU1("{}={}||{};", inst, a, b); | ||
| 16 | } | ||
| 17 | |||
| 18 | void EmitLogicalAnd(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 19 | ctx.AddU1("{}={}&&{};", inst, a, b); | ||
| 20 | } | ||
| 21 | |||
| 22 | void EmitLogicalXor(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 23 | ctx.AddU1("{}={}^^{};", inst, a, b); | ||
| 24 | } | ||
| 25 | |||
| 26 | void EmitLogicalNot(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 27 | ctx.AddU1("{}=!{};", inst, value); | ||
| 28 | } | ||
| 29 | } // namespace Shader::Backend::GLSL | ||