diff options
| author | 2021-05-27 20:31:03 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | a752ec88d06c6bcfb13605447a164c6b6915ed6e (patch) | |
| tree | 5e0bb8f30120199ed4955d402ff0b554db257e2c /src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp | |
| parent | glsl: Fix non-immediate buffer access (diff) | |
| download | yuzu-a752ec88d06c6bcfb13605447a164c6b6915ed6e.tar.gz yuzu-a752ec88d06c6bcfb13605447a164c6b6915ed6e.tar.xz yuzu-a752ec88d06c6bcfb13605447a164c6b6915ed6e.zip | |
glsl: Implement derivatives and YDirection
plus some other misc additions/changed
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp index e69de29bb..187677878 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp | |||
| @@ -0,0 +1,35 @@ | |||
| 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/modifiers.h" | ||
| 10 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 11 | #include "shader_recompiler/profile.h" | ||
| 12 | |||
| 13 | namespace Shader::Backend::GLSL { | ||
| 14 | void EmitFSwizzleAdd([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 15 | [[maybe_unused]] std::string_view op_a, [[maybe_unused]] std::string_view op_b, | ||
| 16 | [[maybe_unused]] std::string_view swizzle) { | ||
| 17 | throw NotImplementedException("GLSL Instruction"); | ||
| 18 | } | ||
| 19 | |||
| 20 | void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) { | ||
| 21 | ctx.AddF32("{}=dFdxFine({});", inst, op_a); | ||
| 22 | } | ||
| 23 | |||
| 24 | void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) { | ||
| 25 | ctx.AddF32("{}=dFdyFine({});", inst, op_a); | ||
| 26 | } | ||
| 27 | |||
| 28 | void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) { | ||
| 29 | ctx.AddF32("{}=dFdxCoarse({});", inst, op_a); | ||
| 30 | } | ||
| 31 | |||
| 32 | void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) { | ||
| 33 | ctx.AddF32("{}=dFdyCoarse({});", inst, op_a); | ||
| 34 | } | ||
| 35 | } // namespace Shader::Backend::GLSL | ||