On Wed, 2004-09-22 at 13:21, Ian Romanick wrote:
Philipp Klaus Krause wrote:
_mesa_test_os_sse_exception, executed upon start of any OpenGL application raises SIGFPE. Normally this is not a problem, applications continue to execute normally.
However when using the jogl OpenGL Java binding programs exit. I tried both with Java 1.4 from Sun and sablevm.
That's annoying. It seems like it must be a bug somewhere, but it's not obvious to me where. Can you track down why / where the program terminates? I looked at the code in check_os_sse_support (src/mesa/x86/common_x86.c, line 143), and it doesn't look like there should be any way for the signal to get past Mesa.
Beyond that, the code in there *is* really awful. Is there a better way on modern-ish Linux systems to do this? Comments in the code indicate that a lot of the uglyness there is to workaround issues with certain 2.2 kernels and kernels not properly configured for Pentium3 CPUs. So, what's the right way on a 2.4 or a 2.6 kernel to determine if an app can use SSE? What about BSD?
At the time the code was written (fall 1999?) the only way Gareth found that he could reliably determine that SSE was fully supported (by CPU and kernel) was to try executing an SSE instruction and catching the exception if it failed.
If there's a better way of doing that nowadays, we could update Mesa.
A work-around might be for Phillip to set the MESA_NO_SSE env var.
On FreeBSD we just use a convenient little sysctl to pull out whether there's SSE and the kernel supports it.
-Brian
------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel