Skip to content

Add facilities for logging that can be switched on by using an environment variable

Gert Wollny requested to merge gerddie/virglrenderer:add-debug into master

Fixing virglrenderer I saw myself adding and removing the same debug messages over and over again, so I think it would be nice to have switchable logging build into the debug builds.

This MR replaces the compile time shader logging flag with a flag that can be set from the environment, and it adds a few other flags that have been proven useful to me.

In addition, one can sent the debug flags from the guest of the host allows so.

When build in release mode the logging itself is not compiled in.

The fact that the host may initiate logging on the guests request is indicated by a new CAPS flag.

Reworked version:

  • Make VREND_DEBUG more like printf, i.e. no more need to add fprintf(stderr all the time. The extended printout now uses a macro VREND_DEBUG_EXT
  • reorder the patches to enable the logging flags one by one
  • add some texture logging

Futher updates:

  • Rework the feature table and include proper feature names in the log output
  • Move some feature tests so that they are only called when a feature is really needed (like Tess shaders and images)
Edited by Gert Wollny

Merge request reports