diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-06-22 07:12:11 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:39 +0200 |
commit | fb9b1787f86d069db27fe0af44ded042c6d8de39 (patch) | |
tree | ac1e1056f0ce34be34063dc5ce38c34faceaf946 /src/video_core/renderer_opengl/gl_device.cpp | |
parent | general: Add setting shader_backend (diff) | |
download | yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar.gz yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar.bz2 yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar.lz yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar.xz yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.tar.zst yuzu-fb9b1787f86d069db27fe0af44ded042c6d8de39.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index c4eeed53b..99f8769fc 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -177,6 +177,11 @@ Device::Device() { GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 && GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2; + shader_backend = (Settings::values.shader_backend.GetValue() == + Settings::ShaderBackend::GLASM) == use_assembly_shaders + ? Settings::values.shader_backend.GetValue() + : Settings::ShaderBackend::GLSL; + // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && !(is_amd || (is_intel && !is_linux)); @@ -188,8 +193,7 @@ Device::Device() { LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}", has_broken_texture_view_formats); - if (Settings::values.shader_backend.GetValue() == Settings::ShaderBackend::GLASM && - !use_assembly_shaders) { + if (shader_backend == Settings::ShaderBackend::GLASM && !use_assembly_shaders) { LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported"); } |