|Summary:||OSMesaGetProcAdress always fails on mangled OSMesa|
|Product:||Mesa||Reporter:||Frederic Devernay <frederic.devernay>|
|Status:||RESOLVED FIXED||QA Contact:||mesa-dev|
|i915 platform:||i915 features:|
|Bug Depends on:||91724|
Description Frederic Devernay 2016-04-18 16:04:56 UTC
Created attachment 123027 [details] patch OSMesaGetProcAdress on mangled OSMesa checks that the first three characters are "mgl", but the functions in the table are stored without the leading "m", thus OSMesaGetProcAddress always returns a dummy function. The proposed solution is similar to https://lists.freedesktop.org/archives/mesa-dev/2015-September/095251.html : If we are on mangled osmesa and the first character is "m", skip it and proceed. Thus OSMesaGetProcAddress("mglCreateShader") and OSMesaGetProcAddress("glCreateShader") return the same thing on mangled OSMesa, and the former doesn't work on non-mangled OSMesa. This bug also depends on https://bugs.freedesktop.org/show_bug.cgi?id=91724 (which has a proposed solution) Plese note that mangled OSMesa is a very useful feature, and may even be necessary in some situations, as I discussed in https://bugs.freedesktop.org/show_bug.cgi?id=91724#c4 I provide scripts for building and installing various flavors of OSMesa, as well as a simple test program that checks the return values of OSMesaGetProcAddress at: https://github.com/devernay/osmesa-install Fred (early Mesa contributor, see the Mesa 1.2.1 README!)
Comment 1 Brian Paul 2016-04-25 16:34:24 UTC
Hi Frederic, Your patch looks good to me, so, Reviewed-by: Brian Paul <email@example.com> I'll commit this soon and tag it for inclusion in the 11.1.x and 11.2.x branches. Though, I don't see how this directly depends on bug 91724. It seems like a separate issue (though also related to mangling).
Comment 2 Brian Paul 2016-04-26 17:18:54 UTC
Patch committed (23949cdf2c8563) Closing this bug.
on Jan 21, 2017 at 21:40:32.
(provided by the Example extension).