diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-29 19:27:01 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:28 +0100 |
commit | f086c82e1f80cae088bb22de9092598dc51979da (patch) | |
tree | 8e055b4397c2dc9288a8fed65daf171488ecadc9 /src/video_core | |
parent | texture_cache: Fix blacklists on compute (diff) | |
download | yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar.gz yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar.bz2 yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar.lz yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar.xz yuzu-f086c82e1f80cae088bb22de9092598dc51979da.tar.zst yuzu-f086c82e1f80cae088bb22de9092598dc51979da.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index 0bbda7951..92fda9af0 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp @@ -443,11 +443,24 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) { if (!is_built.load(std::memory_order::relaxed)) { WaitForBuild(); } - if (assembly_programs[0].handle != 0) { + const bool use_assembly{assembly_programs[0].handle != 0}; + const bool is_rescaling{texture_cache.IsRescaling()}; + const f32 config_down_factor{Settings::values.resolution_info.down_factor}; + const f32 down_factor{is_rescaling ? config_down_factor : 1.0f}; + if (use_assembly) { program_manager.BindAssemblyPrograms(assembly_programs, enabled_stages_mask); } else { program_manager.BindSourcePrograms(source_programs); } + for (size_t stage = 0; stage < source_programs.size(); ++stage) { + if (stage_infos[stage].uses_rescaling_uniform) { + if (use_assembly) { + glProgramEnvParameter4fARB(AssemblyStage(stage), 0, down_factor, 0.0f, 0.0f, 1.0f); + } else { + glProgramUniform1f(source_programs[stage].handle, 0, down_factor); + } + } + } const VideoCommon::ImageViewInOut* views_it{views.data()}; GLsizei texture_binding = 0; GLsizei image_binding = 0; |