Linux OpenGL: when context creation fails, bgfx silently falls back to the Noop renderer
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp, linux
- Área
- computer-graphics
Línea de trabajo
Start in DeviceImpl.cpp, where bgfx::init is called and the renderer type is never checked, and look at the deviceStillLost path you must leave alone. Compare init.type with bgfx::getRendererType() after init, then make the device throw "bgfx could not initialize the OpenGL renderer" when a non-Noop request comes back as Noop. ShaderProvider.cpp and TestUtils.getFrameBufferData show the symptoms but are not the fix. Done means a failed EGL display setup stops the device with that error instead of running on as Noop.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When bgfx can't create the OpenGL context, bgfx::init still succeeds: it falls back to RendererType::Noop. DeviceImpl doesn't check for this. Babylon Native keeps running and the render loop spins, but nothing is drawn:
- every effect fails to compile with "Shader compiler assumptions are not met" (
ShaderProvider.cpp), because the Noop renderer's caps don't match OpenGL's; TestUtils.getFrameBufferDatanever calls back.
The real cause (here, eglGetDisplay failing) appears only in a BX_CONFIG_DEBUG trace ("Init error: Failed to get display").
To Reproduce
- Build the X11 Playground with
GRAPHICS_API=OpenGLon master (ea62d5b). - Run it on an NVIDIA GPU with NVIDIA's EGL. On a hybrid laptop:
__NV_PRIME_RENDER_OFFLOAD=1 __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json. - Every scene fails to compile its shaders and nothing is drawn. The underlying failure is fixed by #2086.
Expected behavior
If a real renderer was requested (init.type != Noop) and bgfx::getRendererType() comes back as Noop after bgfx::init, without a device loss in progress, the device should fail loudly, for example by throwing "bgfx could not initialize the OpenGL renderer". It should not run on as Noop. The device-lost path (deviceStillLost in DeviceImpl.cpp) may need to keep its current behavior.
Other
- Platform: Linux (X11), OpenGL. Seen on NVIDIA GTX 1660 Ti, driver 620.70.06, Fedora 44.
- Lenguaje dominante
- C++
- Estrellas
- 931
- Forks
- 169
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 66
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de BabylonJS/BabylonNative
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
BabylonJS/BabylonNative#2138 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
BabylonJS/BabylonNative#2042 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
BabylonJS/BabylonNative#2052 ·
Los mantenedores suelen responder en 1 día
-
testing
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
BabylonJS/BabylonNative#2136 ·
Los mantenedores suelen responder en 1 día
-
Support useNDCHalfZRange (half-range NDC depth) so Babylon.js half-range depth visual tests can runAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
BabylonJS/BabylonNative#2134 ·
Los mantenedores suelen responder en 1 día
Todos los issues de BabylonJS/BabylonNative
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
simnJS/AnyPS5#735 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-format
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Niko1221/Strata#7719 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
area:tests kind:test
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día