diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-15 12:05:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-15 12:05:01 -0500 |
| commit | 3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6 (patch) | |
| tree | 0d014da28cf6a8a1045cd2a7d7df8301522ea47c /src/video_core/renderer_opengl/gl_device.cpp | |
| parent | e2f32e8c88621dbb816d38bc1ffc610d7eb2ae03 (diff) | |
| parent | 09e3029c1118616394e5e9c45dfcdd4adcdf86ad (diff) | |
Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
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); |
