Page MenuHome

GHOST: Only spam about X11 errors when using --debug-ghost
ClosedPublic

Authored by Sergey Sharybin (sergey) on Oct 14 2019, 12:46 PM.

Details

Summary

This commit adds a new command line argument --debug-ghost and
makes it so X11 errors happening during context initialization
are only printed when this new flag is sued.

There is no need to flood users with errors when their GPU is
not supporting latest OpenGL version. Or, at a very minimum,
the error must be more meaning full.

Diff Detail

Repository
rB Blender
Branch
ghost_debug (branched from master)
Build Status
Buildable 5352
Build 5352: arc lint + arc unit

Event Timeline

Can this use the existing GHOST_glDebugContext flag?

There are two main issues with the GHOST_glDebugContext:

  • It only exists for Window. So accessing it from a custom callback is rather impossible. Sure, we can setup "silent" version of GHOST_X11_ApplicationErrorHandlerbut thewn if one wants to set up a breakpoint he would need to think ahead about which function to set it to.
  • It is all done in a specific implementation of the Window, you can not access it neither via GHOST_Window nor via GHOST_IWindow.

To me the implementation of GHOST_glDebugContext is just weak and wrong. And if anything it should be replaced with something instead of basing something else on top of such a weak thing.

This revision is now accepted and ready to land.Oct 15 2019, 10:26 AM