http://bugs.freedesktop.org/show_bug.cgi?id=11404

           Summary: Nexuiz GLSL shader compilation fails
           Product: Mesa
           Version: CVS
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Out of curiosity, I was trying out Mesa 7.0's (and Mesa from GIT) software
rasterizer with the DarkPlaces engine. The low frames per second aside (which
makes this unusable anyway), I found some issues in the GLSL compiler.

The GLSL shader used by Nexuiz (I am using the current DarkPlaces engine from
svn, and no specific GLSL shader, just the one inside the engine) fails to
compile with the following message:

  Error: Function 'vec2' not found (check argument types)

The offending line is

  TexCoord = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);

I tried rewriting this as

  TexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;

and changed one other occurrence of this the same way, and actually got further
- it now crashes with signal 6 when compiling:

  Mesa 7.1 implementation error: invalid writemask in make_writemask()
  Please report at bugzilla.freedesktop.org
  Mesa 7.1 implementation error: invalid writemask in make_writemask()
  Please report at bugzilla.freedesktop.org
  Mesa 7.1 implementation error: invalid writemask in make_writemask()
  Please report at bugzilla.freedesktop.org
  nexuiz: shader/slang/slang_emit.c:960: emit_move: Assertion
`n->Children[0]->Store->Index >= 0' failed.
  Received signal 6, exiting...

Ifdeffing out stuff till the error disappears led me to the conclusion that
this is the (or one) offending line:

  color.rgb *= AmbientColor + DiffuseColor *
myhalf(max(float(dot(surfacenormal, diffusenormal)), 0.0));

(myhalf is #defined above as float, so you can just ignore it)

Curiously, I also got a segmentation fault when enabling this line...

  color.rgb = color.rgb * SceneBrightness / (ContrastBoostCoeff * color.rgb +
myhvec3(1, 1, 1));

but I could not reproduce it, so I can't provide a backtrace.

Would be nice if this could get fixed... maybe there are also some
nonconforming things in the DarkPlaces GLSL shader, would be nice if anyone
could look and help sorting that out... it currently works fine with nvidia and
mostly fine (too many ALU instructions when enabling offsetmapping and a
subsequent driver crash) with ATI.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to