From 55608665efe2558b9b2a3bbebfb180f079df36ac Mon Sep 17 00:00:00 2001 From: ivisaf <109368531+ivisaf@users.noreply.github.com> Date: Fri, 23 Oct 2026 13:43:20 +0000 Subject: [PATCH] gpu: open the OpenGL regression device without indirect-call validation (#5101) NVIDIA's EGL answers wgpu's request for a GL 3.3 context with exactly 3.3 (GLSL 3.30) yet lists GL_ARB_compute_shader. wgpu-hal then reports compute shaders, wgpu-core builds its indirect-call validation pipeline, naga cannot emit compute GLSL below 4.30, and request_device fails as Device(Lost). The test draws nothing indirect, so it opts out of that validation. Co-authored-by: Claude Opus 5.5 --- crates/gpu/tests/capture.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/gpu/tests/capture.rs b/crates/gpu/tests/capture.rs index e368d1194..fd544f7a0 100644 --- a/crates/gpu/tests/capture.rs +++ b/crates/gpu/tests/capture.rs @@ -45,6 +45,11 @@ fn session(script: &[(&str, serde_json::Value)]) -> Session { fn opengl_viewport_pipelines_render_a_model() { let mut desc = wgpu::InstanceDescriptor::new_without_display_handle(); desc.backends = wgpu::Backends::GL; + // NVIDIA's EGL answers wgpu's request for GL 3.3 with exactly 3.3 yet lists + // GL_ARB_compute_shader, so wgpu builds its indirect-call validation pipeline, naga cannot + // emit compute GLSL below 4.30, and request_device fails as Device(Lost). The test draws + // nothing indirect, so the validation is not needed here. + desc.flags.remove(wgpu::InstanceFlags::VALIDATION_INDIRECT_CALL); let instance = wgpu::Instance::new(desc); let adapter = match pollster::block_on(instance.request_adapter(&Default::default())) { Ok(adapter) => adapter,