Bug 46037

Summary: Offscreen OpenGL rendering causes 'Illegal instruction (core dumped)' in XFree86-4.2.0_1,1
Product: Ports & Packages Reporter: Pete French <pete>
Component: Individual Port(s)Assignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Pete French 2002-12-06 21:20:01 UTC
	Attempting to do any offscreen rendering using OSMesa in
	XFree86-4.2.0_1,1 causes an 'Illegal Instruction' error. This causes
	any programs using OpenGL in this way to fail.

Fix: 

None known.
How-To-Repeat: 
	Try and run any piece of code using the OSMesa libraries. The osdemo.c
	program provided with Mesa for example:

	cc -I/usr/X11R6/include osdemo.c -L/usr/X11R6/lib -lGL -lGLU -lglut -lOSMesa
	./a.out
	Illegal instruction (core dumped)

	According to gdb the error occurs in gl_katmai_transform_points3_3d_raw()
	and this is where I also see it when running my own code.
Comment 1 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2002-12-06 23:09:14 UTC
Responsible Changed
From-To: freebsd-ports->anholt

Over to maintainer(s)
Comment 2 Eric Anholt freebsd_committer freebsd_triage 2002-12-08 05:45:00 UTC
State Changed
From-To: open->closed

This should be fixed in XFree86-libraries-4.2.1_5. Thanks!
Comment 3 Sergey N. Voronkov 2002-12-09 07:01:23 UTC
On Fri, Dec 06, 2002 at 09:12:09PM +0000, Pete French wrote:
[skip]
> >How-To-Repeat:
> 
> 	Try and run any piece of code using the OSMesa libraries. The osdemo.c
> 	program provided with Mesa for example:
> 
> 	cc -I/usr/X11R6/include osdemo.c -L/usr/X11R6/lib -lGL -lGLU -lglut -lOSMesa
> 	./a.out
> 	Illegal instruction (core dumped)
> 
> 	According to gdb the error occurs in gl_katmai_transform_points3_3d_raw()
> 	and this is where I also see it when running my own code.
> 
> >Fix:

Mesa is trying to use SSE instruction set. Add this line to your 
kernel config file to fix your problem.

options         CPU_ENABLE_SSE

Serg N. Voronkov,
Sibitex JSC
Comment 4 Pete French 2002-12-09 15:53:41 UTC
> Mesa is trying to use SSE instruction set. Add this line to your 
> kernel config file to fix your problem.
>
> options         CPU_ENABLE_SSE

This solves it, thanks.

-pete.