summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar lat9nq2021-07-08 17:28:48 -0400
committerGravatar ameerj2021-07-22 21:51:39 -0400
commit1152d66ddd4e7b29b53e01990fef77e4cff20e24 (patch)
tree9530d5e2c00afd904d95e1a4066d5e4e7f3571c5 /src/video_core
parentglsl: Declare local memory in main (diff)
downloadyuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.tar.gz
yuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.tar.xz
yuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.zip
general: Add setting shader_backend
GLASM is getting good enough that we can move it out of advanced graphics settings. This removes the setting `use_assembly_shaders`, opting for a enum class `shader_backend`. This comes with the benefits that it is extensible for additional shader backends besides GLSL and GLASM, and this will work better with a QComboBox. Qt removes the related assembly shader setting from the Advanced Graphics section and places it as a new QComboBox in the API Settings group. This will replace the Vulkan device selector when OpenGL is selected. Additionally, mark all of the custom anisotropic filtering settings as "WILL BREAK THINGS", as that is the case with a select few games.
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp10
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 6818951f2..c4eeed53b 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -172,9 +172,10 @@ Device::Device() {
172 // uniform buffers as "push constants" 172 // uniform buffers as "push constants"
173 has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data; 173 has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data;
174 174
175 use_assembly_shaders = Settings::values.use_assembly_shaders.GetValue() && 175 use_assembly_shaders =
176 GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 && 176 Settings::values.shader_backend.GetValue() == Settings::ShaderBackend::GLASM &&
177 GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2; 177 GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 && GLAD_GL_NV_transform_feedback &&
178 GLAD_GL_NV_transform_feedback2;
178 179
179 // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. 180 // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation.
180 use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && 181 use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() &&
@@ -187,7 +188,8 @@ Device::Device() {
187 LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}", 188 LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}",
188 has_broken_texture_view_formats); 189 has_broken_texture_view_formats);
189 190
190 if (Settings::values.use_assembly_shaders.GetValue() && !use_assembly_shaders) { 191 if (Settings::values.shader_backend.GetValue() == Settings::ShaderBackend::GLASM &&
192 !use_assembly_shaders) {
191 LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported"); 193 LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
192 } 194 }
193 195