[Mesa-dev] Print error message when switching to indirect rendering
Carl Worth
cworth at cworth.org
Mon Feb 6 15:14:56 PST 2012
On 2012-02-04, Jon TURNEY wrote:
> It looks like these error messages will always be emitted when software-direct
> and indirect are the only paths available (e.g. when ./configured with
> --with-dri-drivers=swrast or --disable-driglx-direct).
Thanks for sharing your concern, Jon. I certainly don't want to
increase unwanted error-message spew.
Checking the code, the case of --disable-driglx-direct is already
fine. All of these error messages are in C files that are already
protected by:
#if defined(GLX_DIRECT_RENDERING)
so this code won't even get compiled if direct rendering is disabled.
As to swrast being the only driver available, that one is a bit
trickier to detect. If the X server tells Mesa that the hardware wants
a driver named "i965_dri.so", then Mesa is going to try to load that
driver, (and will not be able to distinguish between the cases of "I
intentionally never compiled that driver" vs. "I had compiled that
driver, but unintentionally deleted it").
But I imagine that anybody that *is* intentionally using
--with-dri-drivers=swrast is already arranging it so that the X server
never asks Mesa to load a driver like "i965" anyway, (for example, by
using the "vesa" driver or whatever").
So, I don't think there will be any undesired spew.
Meanwhile, Ian gave me some off-list (in-person) review of the
patches, and in response to that I reworked the error messages
slightly. They now happen a bit sooner, (immediately after a
driver-load attempt fails), and are reworded to actually identify the
name of the driver that failed to load. So these should be even friendlier.
See the following two patches for the new messages.
-Carl
More information about the mesa-dev
mailing list