Michael Schlueter wrote:
> Hi,
> 
> I'm trying to use a program called gtkradiant
> (http://zerowing.idsoftware.com/) that is a map editor for quake and all
> the other games from ID Software. My problem now is that the 3D view is
> very slow for me. After testing it with different graphic cards it looks
> like that it works slow with Matrox G400 and 3Dfx voodoo but fast with
> NVidia (and with LIBGL_ALWAYS_INDIRECT=1 faster than without).
> 
> Since all the other openGL programms are working "fast" I think it is an
> issure with gtkradiant. After searching for a solution I found the
> XFree86 page about DRI (http://www.xfree86.org/4.2.0/DRI10.htm) saying
> that under certain conditions the dri driver will switch into software
> rendering.
> 
> My question now is how can I detect that switch and find the gl call
> that cause it? Is there a point where I can set a breakpoint or
> something else?


Most of the DRI drivers have a per-context field called 'Fallback'.
It's a bitmask which records various reasons why we need to fallback
to software rendering.  In the case of the mga (G400) driver you'll
see these flags in mgacontext.h:

#define MGA_FALLBACK_TEXTURE        0x1
#define MGA_FALLBACK_DRAW_BUFFER    0x2
#define MGA_FALLBACK_READ_BUFFER    0x4
#define MGA_FALLBACK_LOGICOP        0x8
#define MGA_FALLBACK_RENDERMODE     0x10
#define MGA_FALLBACK_STENCIL        0x20
#define MGA_FALLBACK_DEPTH          0x40

If you search the code, you'll find where we set these flags by
calling mgaFallback() (via the FALLBACK() macro).  You could put
a printf in there to print the bit value and get an idea of what's
slowing you down.

-Brian



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to