summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorWollnashorn <Wollnashorn@users.noreply.github.com>2023-04-05 01:29:46 +0200
committerWollnashorn <Wollnashorn@users.noreply.github.com>2023-04-08 16:12:30 +0200
commit780240e6979b198e7bd10feaad5399b8b4b63762 (patch)
treec145f48c66cf003e618cefc63496e3f5b7637f56 /src/video_core/renderer_opengl
parentMerge pull request #10024 from german77/crysis (diff)
downloadyuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar.gz
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar.bz2
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar.lz
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar.xz
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.tar.zst
yuzu-780240e6979b198e7bd10feaad5399b8b4b63762.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp1
-rw-r--r--src/video_core/renderer_opengl/gl_device.h5
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index 22ed16ebf..d36a0a7a1 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -169,6 +169,7 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) {
has_draw_texture = GLAD_GL_NV_draw_texture;
warp_size_potentially_larger_than_guest = !is_nvidia && !is_intel;
need_fastmath_off = is_nvidia;
+ need_gather_subpixel_offset = is_amd;
can_report_memory = GLAD_GL_NVX_gpu_memory_info;
// At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 3ff8cad83..e8104c4de 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -160,6 +160,10 @@ public:
return need_fastmath_off;
}
+ bool NeedsGatherSubpixelOffset() const {
+ return need_gather_subpixel_offset;
+ }
+
bool HasCbufFtouBug() const {
return has_cbuf_ftou_bug;
}
@@ -225,6 +229,7 @@ private:
bool has_draw_texture{};
bool warp_size_potentially_larger_than_guest{};
bool need_fastmath_off{};
+ bool need_gather_subpixel_offset{};
bool has_cbuf_ftou_bug{};
bool has_bool_ref_bug{};
bool can_report_memory{};
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 479bb8ba3..b40aa6f5e 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -218,6 +218,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
.lower_left_origin_mode = true,
.need_declared_frag_colors = true,
.need_fastmath_off = device.NeedsFastmathOff(),
+ .need_gather_subpixel_offset = device.NeedsGatherSubpixelOffset(),
.has_broken_spirv_clamp = true,
.has_broken_unsigned_image_offsets = true,