diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index b6b6659c1..208fc6167 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -188,20 +188,6 @@ bool IsASTCSupported() { | |||
| 188 | return true; | 188 | return true; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | /// @brief Returns true when a GL_RENDERER is a Turing GPU | ||
| 192 | /// @param renderer GL_RENDERER string | ||
| 193 | bool IsTuring(std::string_view renderer) { | ||
| 194 | static constexpr std::array<std::string_view, 12> TURING_GPUS = { | ||
| 195 | "GTX 1650", "GTX 1660", "RTX 2060", "RTX 2070", | ||
| 196 | "RTX 2080", "TITAN RTX", "Quadro RTX 3000", "Quadro RTX 4000", | ||
| 197 | "Quadro RTX 5000", "Quadro RTX 6000", "Quadro RTX 8000", "Tesla T4", | ||
| 198 | }; | ||
| 199 | return std::any_of(TURING_GPUS.begin(), TURING_GPUS.end(), | ||
| 200 | [renderer](std::string_view candidate) { | ||
| 201 | return renderer.find(candidate) != std::string_view::npos; | ||
| 202 | }); | ||
| 203 | } | ||
| 204 | |||
| 205 | } // Anonymous namespace | 191 | } // Anonymous namespace |
| 206 | 192 | ||
| 207 | Device::Device() | 193 | Device::Device() |
| @@ -213,7 +199,6 @@ Device::Device() | |||
| 213 | 199 | ||
| 214 | const bool is_nvidia = vendor == "NVIDIA Corporation"; | 200 | const bool is_nvidia = vendor == "NVIDIA Corporation"; |
| 215 | const bool is_amd = vendor == "ATI Technologies Inc."; | 201 | const bool is_amd = vendor == "ATI Technologies Inc."; |
| 216 | const bool is_turing = is_nvidia && IsTuring(renderer); | ||
| 217 | 202 | ||
| 218 | bool disable_fast_buffer_sub_data = false; | 203 | bool disable_fast_buffer_sub_data = false; |
| 219 | if (is_nvidia && version == "4.6.0 NVIDIA 443.24") { | 204 | if (is_nvidia && version == "4.6.0 NVIDIA 443.24") { |
| @@ -238,15 +223,12 @@ Device::Device() | |||
| 238 | has_component_indexing_bug = is_amd; | 223 | has_component_indexing_bug = is_amd; |
| 239 | has_precise_bug = TestPreciseBug(); | 224 | has_precise_bug = TestPreciseBug(); |
| 240 | has_nv_viewport_array2 = GLAD_GL_NV_viewport_array2; | 225 | has_nv_viewport_array2 = GLAD_GL_NV_viewport_array2; |
| 226 | has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory; | ||
| 241 | 227 | ||
| 242 | // At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive | 228 | // At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive |
| 243 | // uniform buffers as "push constants" | 229 | // uniform buffers as "push constants" |
| 244 | has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data; | 230 | has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data; |
| 245 | 231 | ||
| 246 | // Nvidia's driver on Turing GPUs randomly crashes when the buffer is made resident, or on | ||
| 247 | // DeleteBuffers. Disable unified memory on these devices. | ||
| 248 | has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory && !is_turing; | ||
| 249 | |||
| 250 | use_assembly_shaders = Settings::values.use_assembly_shaders && GLAD_GL_NV_gpu_program5 && | 232 | use_assembly_shaders = Settings::values.use_assembly_shaders && GLAD_GL_NV_gpu_program5 && |
| 251 | GLAD_GL_NV_compute_program5 && GLAD_GL_NV_transform_feedback && | 233 | GLAD_GL_NV_compute_program5 && GLAD_GL_NV_transform_feedback && |
| 252 | GLAD_GL_NV_transform_feedback2; | 234 | GLAD_GL_NV_transform_feedback2; |