[Mesa-dev] GL_ARB_debug_output from drivers

Jose Fonseca jfonseca at vmware.com
Sat Feb 23 00:05:56 PST 2013

----- Original Message -----
> 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?

I thought that __VA_ARGS__ didn't work on MSVC, but according to http://msdn.microsoft.com/en-us/library/ms177415.aspx it does. Actually galahad uses it on src/gallium/drivers/galahad/glhd_context.h so it must be working everywhere we care.


More information about the mesa-dev mailing list