diff options
| author | 2023-06-10 11:40:58 -0400 | |
|---|---|---|
| committer | 2023-06-10 12:30:39 -0400 | |
| commit | 2bb7ea436dc74f812a8092201dc597ed58ff3c7a (patch) | |
| tree | 27b6426a646112e163ae39b733ce60ca6d6aa748 /src/video_core/renderer_opengl | |
| parent | Merge pull request #10685 from liamwhite/serialization-is-hard (diff) | |
| download | yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.tar.gz yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.tar.xz yuzu-2bb7ea436dc74f812a8092201dc597ed58ff3c7a.zip | |
shader_recompiler: remove barriers in conditional control flow when device lacks support
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.h | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 1 |
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 400c21981..03d234f2f 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -201,6 +201,7 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) { | |||
| 201 | use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && | 201 | use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && |
| 202 | !(is_amd || (is_intel && !is_linux)) && !strict_context_required; | 202 | !(is_amd || (is_intel && !is_linux)) && !strict_context_required; |
| 203 | use_driver_cache = is_nvidia; | 203 | use_driver_cache = is_nvidia; |
| 204 | supports_conditional_barriers = !is_intel; | ||
| 204 | 205 | ||
| 205 | LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi); | 206 | LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi); |
| 206 | LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug); | 207 | LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug); |
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h index cc0b95f1a..ad27264e5 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h | |||
| @@ -188,6 +188,10 @@ public: | |||
| 188 | return strict_context_required; | 188 | return strict_context_required; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | bool SupportsConditionalBarriers() const { | ||
| 192 | return supports_conditional_barriers; | ||
| 193 | } | ||
| 194 | |||
| 191 | private: | 195 | private: |
| 192 | static bool TestVariableAoffi(); | 196 | static bool TestVariableAoffi(); |
| 193 | static bool TestPreciseBug(); | 197 | static bool TestPreciseBug(); |
| @@ -233,6 +237,7 @@ private: | |||
| 233 | bool has_bool_ref_bug{}; | 237 | bool has_bool_ref_bug{}; |
| 234 | bool can_report_memory{}; | 238 | bool can_report_memory{}; |
| 235 | bool strict_context_required{}; | 239 | bool strict_context_required{}; |
| 240 | bool supports_conditional_barriers{}; | ||
| 236 | 241 | ||
| 237 | std::string vendor_name; | 242 | std::string vendor_name; |
| 238 | }; | 243 | }; |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 6ecda2984..183c1a7ea 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -238,6 +238,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo | |||
| 238 | .support_snorm_render_buffer = false, | 238 | .support_snorm_render_buffer = false, |
| 239 | .support_viewport_index_layer = device.HasVertexViewportLayer(), | 239 | .support_viewport_index_layer = device.HasVertexViewportLayer(), |
| 240 | .support_geometry_shader_passthrough = device.HasGeometryShaderPassthrough(), | 240 | .support_geometry_shader_passthrough = device.HasGeometryShaderPassthrough(), |
| 241 | .support_conditional_barrier = device.SupportsConditionalBarriers(), | ||
| 241 | } { | 242 | } { |
| 242 | if (use_asynchronous_shaders) { | 243 | if (use_asynchronous_shaders) { |
| 243 | workers = CreateWorkers(); | 244 | workers = CreateWorkers(); |