[Mesa-dev] Detecting Software Rasterizer

Ian Romanick idr at freedesktop.org
Tue Mar 1 12:40:49 PST 2011

Hash: SHA1

On 02/28/2011 10:56 AM, Tim Milligan wrote:
> On Linux I wish to reliably detect via someAPI if OpenGL is using the
> Mesa3D Software Rasterizer (e.g. has no hardware accelerated driver
> installed, or has otherwise selected the software renderer).  The reason
> is that in this case I can fall back on a 2d library that will give me
> better performance for my scenario.  I know a better model is to measure
> performance at runtime, but short of that, is there any more reliable
> way than fetching the GL_RENDERER string and checking for "Software
> Rasterizer"?  Is this string ever localized or historically had some
> other value?

The answer to this question is always: You're asking the wrong question.
 The question you want is whether the OpenGL implementation or your 2D
implementation is faster.  Software OpenGL is one case where the OpenGL
implementation will surely be slower, but it's not the only case.  The
only way to know which is faster is to run a frame of both and measure.
 All other methods fail.

I'd swear that there was something about this in the OpenGL FAQ
(http://www.opengl.org/resources/faq/technical/), but I can't seem to
find it.
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/


More information about the mesa-dev mailing list