diff options
| author | 2021-07-21 22:24:33 -0300 | |
|---|---|---|
| committer | 2021-11-16 22:11:27 +0100 | |
| commit | fb924ea85c22353c1a6f108d38372ab14355695b (patch) | |
| tree | 0918fdff8a4eef5ac26db4bd592f6be5aeab6943 /src/shader_recompiler/backend/glsl | |
| parent | gl_texture_cache: Implement ScaleDown (diff) | |
| download | yuzu-fb924ea85c22353c1a6f108d38372ab14355695b.tar.gz yuzu-fb924ea85c22353c1a6f108d38372ab14355695b.tar.xz yuzu-fb924ea85c22353c1a6f108d38372ab14355695b.zip | |
shader: Add resolution down factor opcode
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 5 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_instructions.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 170db269a..f4ed090e3 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |||
| @@ -445,6 +445,11 @@ void EmitYDirection(EmitContext& ctx, IR::Inst& inst) { | |||
| 445 | ctx.AddF32("{}=gl_FrontMaterial.ambient.a;", inst); | 445 | ctx.AddF32("{}=gl_FrontMaterial.ambient.a;", inst); |
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) { | ||
| 449 | UNIMPLEMENTED(); | ||
| 450 | ctx.AddF32("{}=1.0f;", inst); | ||
| 451 | } | ||
| 452 | |||
| 448 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) { | 453 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) { |
| 449 | ctx.AddU32("{}=lmem[{}];", inst, word_offset); | 454 | ctx.AddU32("{}=lmem[{}];", inst, word_offset); |
| 450 | } | 455 | } |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h index 5936d086f..6cae0b84a 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h +++ b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h | |||
| @@ -85,6 +85,7 @@ void EmitInvocationId(EmitContext& ctx, IR::Inst& inst); | |||
| 85 | void EmitSampleId(EmitContext& ctx, IR::Inst& inst); | 85 | void EmitSampleId(EmitContext& ctx, IR::Inst& inst); |
| 86 | void EmitIsHelperInvocation(EmitContext& ctx, IR::Inst& inst); | 86 | void EmitIsHelperInvocation(EmitContext& ctx, IR::Inst& inst); |
| 87 | void EmitYDirection(EmitContext& ctx, IR::Inst& inst); | 87 | void EmitYDirection(EmitContext& ctx, IR::Inst& inst); |
| 88 | void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst); | ||
| 88 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset); | 89 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset); |
| 89 | void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value); | 90 | void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value); |
| 90 | void EmitUndefU1(EmitContext& ctx, IR::Inst& inst); | 91 | void EmitUndefU1(EmitContext& ctx, IR::Inst& inst); |