Sergio Monteiro Basto wrote:
On Sat, 2005-12-17 at 14:20 -0800, Ian Romanick wrote:

There are several files, including
mesa/glapi/{glapioffsets,dispatch}.h
and mesa/main/{context,api_arrayelt}.c that depend on IN_DRI_DRIVER
being set properly.  If it's not set, the drivers *will* be built
incorrectly.  These are all pretty important.


Well this statement is important (at least to me). This means that my
patches are far way to be correct.

lib/GL/glx needs also IN_DRI_DRIVER because this dir have glapi.c from
mesa/glapi/ and Imakefile have -I$(MESASRCDIR)/src/mesa/glapi

and xc/programs/Xserver/GL/mesa also misses the Defines IN_DRI_DRIVER.
Be careful there. xc/programs/Xserver/GL/mesa is for server opengl
support and MUST NOT have that define if I'm not mistaken. dunno about
that glx directory.
That said, some quick tests with mesa demos, q3 and ut3k3 on a radeon
shows dri works regardless without that define.
Slightly worrying imho is also the different threading defines used for mesa-built drivers and xorg-built ones. The driver doesn't seem to be thread-safe at least, I sometimes got an assertion failure with xdemos/glthreads: glthreads: radeon_ioctl.c:423: radeonEmitAOS: Assertion `component[0]->aos_size == component[0]->aos_stride' failed. Sometimes a drm error (though it continued to run just fine) instead: [drm:radeon_cp_cmdbuf] *ERROR* bad cmd_type 0 at e3a82128 And sometimes it just ran fine. Not sure if that's related though to the defines, I got exactly the same behaviour with a mesa-built radeon_dri.so. And if I use both libGL.so and radeon_dri.so from Mesa, it's even worse, I always get a nice segfault instead:
1023       ASSERT_OUTSIDE_BEGIN_END(ctx);
#0  _mesa_Enable (cap=2929) at main/enable.c:1023
#1  0x0804908c in draw_loop (wt=0x804abc4) at glthreads.c:152
#2  0x08049437 in thread_function (p=0x804abc4) at glthreads.c:301
So neither combination looks particularly thread-safe to me...

Roland


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to