GPU: the compositor declines OpenGL adapters at once (#243)
On OpenGL the compositor translated its compute kernels for tens of seconds (22 s on an RTX 4090) before one failed validation and it fell back to CPU compositing, all before the window's first frame. It now declines GL adapters up front, as it declines adapters without compute shaders. OpenGL is what Window Graphics falls back to for drivers that crash with DirectX 12 or Vulkan. Test: opengl_adapters_get_cpu_compositing_at_once (gpu tests_init; skips without an OpenGL adapter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4d5765f158
commit
fdb655e78e
@@ -335,6 +335,11 @@ impl GpuContext {
|
||||
if !adapter.get_downlevel_capabilities().flags.contains(wgpu::DownlevelFlags::COMPUTE_SHADERS) {
|
||||
return Err(format!("{} ({:?}): no compute shaders", info.name, info.backend));
|
||||
}
|
||||
// OpenGL (Window Graphics ▸ OpenGL for drivers that crash otherwise, #243) translates the
|
||||
// kernels for tens of seconds before one fails validation: CPU compositing at once.
|
||||
if info.backend == wgpu::Backend::Gl {
|
||||
return Err(format!("{} (Gl): the GPU compositor needs DirectX 12, Vulkan, Metal or WebGPU", info.name));
|
||||
}
|
||||
// egui-wgpu asks for WebGL2's limits on GL (no storage buffers at all): building the
|
||||
// pipelines there would be a validation error, which release builds only log.
|
||||
let l = device.limits();
|
||||
|
||||
Reference in New Issue
Block a user