Bug 18481

Summary: GLSL works with 32bit programs, while 64bit programs cause segfault
Product: Mesa Reporter: Mateusz Kaduk <mateusz.kaduk>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mateusz Kaduk 2008-11-11 07:43:51 UTC
Enabling reflection in one game (Ethernal Lands http://www.eternal-lands.com/el_linux_170_install.zip) and enabling GLSL in another game (Nexuiz http://downloads.sourceforge.net/nexuiz/nexuiz-242.zip ) cause segfault for me.

When I contacted Paul Brian it worked for him, however he ask if I am using 32bit version. When I tried 32bit version reflections worked but very slow.

Looks like there is some kind of bug that shaders work for 32bit systems users, while they dont work for modern 64bit systems.

Running those programs in gdb cause freez of X and I dont have opportunity to ssh in, if someone can do it, and fix this issue, that would be nice.
Comment 1 Ian Romanick 2008-12-08 16:40:21 UTC
I'm a little confused by this bug report.  I'm unable to reproduce a segfault in Nexuiz (though I do get an assertion failure, see bug #18477), and Eternal Lands is a 32-bit application.
Comment 2 Mateusz Kaduk 2008-12-09 02:20:04 UTC
(In reply to comment #1)
> I'm a little confused by this bug report.  I'm unable to reproduce a segfault
> in Nexuiz (though I do get an assertion failure, see bug #18477), and Eternal
> Lands is a 32-bit application.
> 

Currently using all AMD64 packages 
Ethernal Lands (from deb http://ppa.launchpad.net/pjbroad/ubuntu hardy main)
Nexuiz (from official Debian's repos)

What happend,
1) After one updated of mesa, Ethernal Lands was working and Nexuiz still crashing
2) Another upgrade in mesa/GLSL prart caused that Nexuiz exits gracefuly to X when trying to enable GLSL. And this is current behaviour.
3) After some time, something broke up again, and EternalLands crash before reaching menu.

I think EL problem was fixed, and now suffers diffrent one. Lets focus on Nexuiz.

I am using master mesa, xf86-intel, libdrm also master eric's drm-intel-next kernel and xserver 1.5.3 from Debian.

When I run game from console and after enabling GLSL it goes back to X, I see on terminal segmentation fault.
Comment 3 Mateusz Kaduk 2008-12-16 04:26:56 UTC
Update

Last commit is
Date:   Mon Dec 15 18:37:39 2008 -0700
mesa: rename slang_library_noise.[ch] to prog_noise.[ch] and rename functions

After latest merge, nexuiz does not segfault anymore on enabling glsl, however
glxinfo shows GLSL 1.10 and in game I get message that

"glsl/default.glsl vertexcolor shader failed
OpenGL 2.0 shader Disabled: Unable to find shader premutation fallback working on this driver.
Things might not work properly but you can try r_glsl 1"

when I try this I also see the same message but with diffrent shaders instead

"glsl/default.glsl lightmap glow failed
 glsl/default.glsl lightmap failed
OpenGL 2.0 shader Disabled.....etc"

glsl/default.glsl is probably packed in pk3 files.

Comment 4 Mateusz Kaduk 2008-12-17 16:08:09 UTC
More information about shaders not working with highr sampling.

In Nexuiz you can bind key for console menu->input
After opening console

log_file glsl.txt
developer 1
r_glsl_restart
log_file ""

I get this

GLSL shader glsl/default.glsl generic diffuse compiled.
GLSL shader glsl/default.glsl generic compiled.

program link log:
Too many texture samplers
GLSL shader glsl/default.glsl lightmap fog glow failed!  some features may not work properly.
program link log:
Too many texture samplers
GLSL shader glsl/default.glsl lightmap fog failed!  some features may not work properly.

program link log:
Too many texture samplers
GLSL shader glsl/default.glsl lightmap failed!  some features may not work properly.
OpenGL 2.0 shaders disabled - unable to find a working shader permutation fallback on this driver (set r_glsl 1 if you want to try again)

^7Server can't keep up: 100.0% CPU, 45.03% lost, offset avg 22.6ms, max 100.0ms, sdev 16.3ms

Comment 5 Mateusz Kaduk 2008-12-24 00:43:06 UTC
I am closing this as architecutre has nothing to do with the bug and games already work, however problem still exist with shaders sampling as they cannot be enabled but this is for diffrent bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.