-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Keith Whitwell wrote: > Ian Romanick wrote: >> >> There is one catch, and I'm not sure how to resolve it. When a driver >> requests a function, it can request a set of identical functions with >> different names. For example, the driver can request that >> glWindowPos3f, glWindowPos3fARB, and glWindowPos3fMESA be created as >> aliases for each other. All three will share the same dispatch offset >> (very important) and the same dispatch function (not as important). >> >> However, if the application calls glXGetProcAddress("glWindowPos3f") >> *and* glXGetProcAddress("glWindowPos3fARB") before the driver is loaded, >> those functions will have different dispatch offsets. That would be >> bad. This is a silly, but perfectly valid thing for an application to >> do. The app will segfault when it tries to call one of the two >> functions but function correctly when it calls the other. This will >> result in difficult to diagnose bug reports being filed on Mesa. >> >> Any suggestions? If possible, I'd like for this to be resolved for Mesa >> 6.5.1. > > Can the two extra/redundant entrypoints be detected and then hardwired > to double-dispatch back to the single, correct entrypoint? > > Or set up the redundant dispatch entries to dispatch to a seperate > routine that then bounces back through the dispatch table to the correct > entrypoint?
I've been thinking of how something like that might work. When the driver adds the entrypoints as a group, we'd pick one to be the "master." The offset of that function is what libGL would tell the driver. If there is any function in the list that has an assigned offset that is different from the master, a second "function" would be generated that is just a jump to the master's dispatch function. Does this match what you were thinking? The problem with that is the driver allocates and initializes the dispatch table all by itself. This all happens inside _mesa_initialize_context (src/mesa/main/context.c, line 1258) and _mesa_init_exec_table (src/mesa/main/state.c, line 113). There are probably a couple ways to work around this, but I think they'll all require some additional mechanism. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFE4NasX1gOwKyEAw8RAmNUAKCCoMWiMIstaHMB2K50NsxK2GXWGgCdFZLK ymQKfadDaFrcG2t5kENjvWs= =mQiN -----END PGP SIGNATURE----- ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev