summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-07-29 21:45:53 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:29 +0100
commitb6060873ce1eea02f99a350f955362e57391ecd1 (patch)
tree0b12c7732a45bbd27ab70bbfb1af4f571ed79535
parentgl_rasterizer: Fix rescale dirty state checking (diff)
downloadyuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar.gz
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar.bz2
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar.lz
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar.xz
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.tar.zst
yuzu-b6060873ce1eea02f99a350f955362e57391ecd1.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_compute_pipeline.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
index ab2baefbb..a11bd5a02 100644
--- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
@@ -143,10 +143,19 @@ void ComputePipeline::Configure() {
}
texture_cache.FillComputeImageViews(std::span(views.data(), views.size()));
+ 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 (assembly_program.handle != 0) {
program_manager.BindComputeAssemblyProgram(assembly_program.handle);
+ if (info.uses_rescaling_uniform) {
+ glProgramEnvParameter4fARB(GL_COMPUTE_PROGRAM_NV, 0, down_factor, 0.0f, 0.0f, 1.0f);
+ }
} else {
program_manager.BindComputeProgram(source_program.handle);
+ if (info.uses_rescaling_uniform) {
+ glProgramUniform1f(source_program.handle, 0, down_factor);
+ }
}
buffer_cache.UnbindComputeTextureBuffers();
size_t texbuf_index{};