gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
12.13k stars 881 forks source link

egl error printed on every frame when running with GL backend in RenderDoc #4667

Open mcclure opened 10 months ago

mcclure commented 10 months ago

Imagine you have a wgpu app which is running with the GL backend on Linux. (Note in addition to the normal reasons this might happen, you will be forced into GL backend anytime the app is launched by RenderDoc on Wayland, as described here).

If your app was launched by opening RenderDoc and choosing the "launch application" feature, you will get this

[2023-11-10T18:34:03Z ERROR wgpu_hal::gles::egl] EGL 'eglGetConfigAttrib' code 0x3005: eglGetConfigAttrib

I tested this with both wgpu 0.16 and 0.18 and with both RenderDoc 1.29 (official from website) and trunk (self-built nov 10 2023).

Repro steps

You can try with this app and you can force EGL by replacing the let instance line with:

    let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends: wgpu::Backends::GL, flags: Default::default(), dx12_shader_compiler: Default::default(), gles_minor_version: Default::default() });

Expected behavior

I don't expect wgpu to print extraneous messages. If the message is saying something important, I don't expect wgpu to act differently when booted by RenderDoc (an app which behaves differently under observation of a debugger is bad).

Unless it presages a deeper problem I consider this minor (it is not impacting any use case I currently have)

Platform

I tested and got this same symptom with BOTH xorg and wayland DEs

teoxoy commented 10 months ago

Related/duplicate: https://github.com/gfx-rs/wgpu/issues/3658.