[Mesa-dev] GL_ARB_debug_output from drivers

Eric Anholt eric at anholt.net
Fri Feb 22 19:52:09 PST 2013

One of the features Valve asked for, that they expected after using other
drivers, is that they can easily get information about performance traps
(and other important stuff) from drivers.  We wrote INTEL_DEBUG=perf this
summer as a quick fix, but it's not how most drivers integrate this sort
of feedback.  Instead, you make a debug context, and you take a bit of a
performance hit but you get GL_ARB_debug_output messages from the driver.

I didn't want to just dump the same ID in every message, since that's
definitely not what the spec intends you to do, so I'd been delaying the
ARB_debug_output work until I could decide how to make that possible.
This is what I came up with after a few false starts.  I haven't fixed up
the current messages to have unique IDs, though.  I'd like to do something
that doesn't involve spamming a static msg_id into each caller, but to
avoid that I need a #define with varargs.  Is __VA_ARGS__ or some
equivalent standard enough that we can rely on it outside of drivers?

More information about the mesa-dev mailing list