diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-15 18:05:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 18:05:01 +0100 |
commit | 3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6 (patch) | |
tree | 0d014da28cf6a8a1045cd2a7d7df8301522ea47c /src/video_core/renderer_opengl/gl_device.cpp | |
parent | Merge pull request #9441 from yuzu-emu/revert-9232-audio-default-thread (diff) | |
parent | gl_device: Use a more robust way to use strict context mode (diff) | |
download | yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.gz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.bz2 yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.lz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.xz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.zst yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index e2e3dac34..cee5c3247 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -112,7 +112,7 @@ bool IsASTCSupported() { } } // Anonymous namespace -Device::Device() { +Device::Device(Core::Frontend::EmuWindow& emu_window) { if (!GLAD_GL_VERSION_4_6) { LOG_ERROR(Render_OpenGL, "OpenGL 4.6 is not available"); throw std::runtime_error{"Insufficient version"}; @@ -126,9 +126,9 @@ Device::Device() { const bool is_intel = vendor_name == "Intel"; #ifdef __unix__ - const bool is_linux = true; + constexpr bool is_linux = true; #else - const bool is_linux = false; + constexpr bool is_linux = false; #endif bool disable_fast_buffer_sub_data = false; @@ -193,9 +193,11 @@ Device::Device() { } } + strict_context_required = emu_window.StrictContextRequired(); // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. + // Blocks EGL on Wayland from using asynchronous shader compilation. use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && - !(is_amd || (is_intel && !is_linux)); + !(is_amd || (is_intel && !is_linux)) && !strict_context_required; use_driver_cache = is_nvidia; LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi); |