diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-05-10 09:10:46 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-05-10 09:48:51 +0300 |
commit | 439f86ac89bdd649aa9ccfe258c5f80474788449 (patch) | |
tree | c2a6a3e183603360479a787e56805b1ac8bcf914 /source/blender/gpu/opengl | |
parent | 11aa237858d4a2f12db43bac97793606eda7f542 (diff) |
Fix T97272: Lag when resizing viewports.temp-T97272
Viewports where cleared explicitly due to compatibility reasons with Intel iGPUs.
This slowed down other platforms as well, this wasn't noticeable on all platforms.
This patch will be more selective when to enable the workaround.
Currently only for iGPUs on Mac + Linux.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 610fd5d980f..0ce01d80a77 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -419,6 +419,13 @@ static void detect_workarounds() GCaps.shader_storage_buffer_objects_support = false; } + /* Certain Intel based platforms don't clear the viewport textures. Always clearing leads to + * noticeable performance regressions. */ + if (GPU_type_matches( + GPU_DEVICE_INTEL, static_cast<eGPUOSType>(GPU_OS_MAC | GPU_OS_UNIX), GPU_DRIVER_ANY)) { + GCaps.clear_viewport_workaround = true; + } + /* Metal-related Workarounds. */ /* Minimum Per-Vertex stride is 1 byte for OpenGL. */ |