summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp
diff options
context:
space:
mode:
authorGravatar ameerj2021-05-27 20:31:03 -0400
committerGravatar ameerj2021-07-22 21:51:36 -0400
commita752ec88d06c6bcfb13605447a164c6b6915ed6e (patch)
tree5e0bb8f30120199ed4955d402ff0b554db257e2c /src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp
parentglsl: Fix non-immediate buffer access (diff)
downloadyuzu-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.cpp35
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
13namespace Shader::Backend::GLSL {
14void 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
20void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) {
21 ctx.AddF32("{}=dFdxFine({});", inst, op_a);
22}
23
24void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) {
25 ctx.AddF32("{}=dFdyFine({});", inst, op_a);
26}
27
28void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) {
29 ctx.AddF32("{}=dFdxCoarse({});", inst, op_a);
30}
31
32void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, std::string_view op_a) {
33 ctx.AddF32("{}=dFdyCoarse({});", inst, op_a);
34}
35} // namespace Shader::Backend::GLSL