summaryrefslogtreecommitdiff
path: root/src/shader_recompiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp3
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.cpp3
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp3
3 files changed, 5 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
index 807494063..77ee6dc0e 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
@@ -211,8 +211,7 @@ void EmitYDirection(EmitContext& ctx, IR::Inst& inst) {
211} 211}
212 212
213void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) { 213void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) {
214 UNIMPLEMENTED(); 214 ctx.Add("MOV.F {}.x,program.env[0].x;", inst);
215 ctx.Add("MOV.F {}.x,1;", inst);
216} 215}
217 216
218void EmitUndefU1(EmitContext& ctx, IR::Inst& inst) { 217void EmitUndefU1(EmitContext& ctx, IR::Inst& inst) {
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp
index 4e6f2c0fe..7c9ed9159 100644
--- a/src/shader_recompiler/backend/glsl/emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_context.cpp
@@ -393,6 +393,9 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
393 DefineGenericOutput(index, program.invocations); 393 DefineGenericOutput(index, program.invocations);
394 } 394 }
395 } 395 }
396 if (info.uses_rescaling_uniform) {
397 header += "layout(location=0) uniform float down_factor;";
398 }
396 DefineConstantBuffers(bindings); 399 DefineConstantBuffers(bindings);
397 DefineStorageBuffers(bindings); 400 DefineStorageBuffers(bindings);
398 SetupImages(bindings); 401 SetupImages(bindings);
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 f4ed090e3..3db3083f9 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
@@ -446,8 +446,7 @@ void EmitYDirection(EmitContext& ctx, IR::Inst& inst) {
446} 446}
447 447
448void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) { 448void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) {
449 UNIMPLEMENTED(); 449 ctx.AddF32("{}=down_factor;", inst);
450 ctx.AddF32("{}=1.0f;", inst);
451} 450}
452 451
453void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) { 452void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) {