Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-06-05, 04:35 PM   #1
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default help needed for solving internal shader-compiler-errors from GLSL-usage

Greetings everybody!

EDIT: Update/Solution

This is mainly targetted at development- and/or support-staff from nVIDIA, but if anyone else has had more success with GLSL under Linux than I had, please don't hesitate to reply!

I wanted to get serious with GLSL-coding/learning/hands-on and grabbed several samples from the net. Among the bits I tried were ShaderDesigner 1.0 (not really working, butt-ugly UI and by now no longer available at TyphoonLabs), ogl2brick (the only thing I got fully working), ogl2particle (unexplainable shader-runtime-errors) and GLSLdemo 3.6 (unexplainable internal shader-compiler errors).

Issues with ShaderDesigner 1.0 in particular:

Since the program is nowhere near such a nice IDE like FXComposer under Windows I will just ignore it. Though I hope that FXComposer or something of the same quality will hit Linux soon.

Issues with ogl2particle in particular:

This OpenGL 2.0 demo from 3Dlabs compiles and runs, but gives out these errors during runtime...

Code:
InfoLog:
Vertex info
-----------
error: the locations of a builtin vertex attribute (named gl_Color) and a bound generic vertex attribute (named Velocity) collided; assign the generic attribute to a different location via glBindAttribLocationARB
No such uniform named "Time"
glError 0x502 file shader.c @ 57: invalid operation
glError 0x502 file ogl2particle.c @ 188: invalid operation
No such uniform named "Time"
glError 0x502 file shader.c @ 57: invalid operation
glError 0x502 file ogl2particle.c @ 188: invalid operation
No such uniform named "Time"
glError 0x502 file shader.c @ 57: invalid operation
glError 0x502 file ogl2particle.c @ 188: invalid operation
...
All I see is a small squarish shape made of differently colored dots, which can be rotated round and zoomed in and out. But nothing like a particle-animation or the like is taking place.

Regarding the named attribute clash of "gl_Color" and "Velocity" and the manual on the call glBindAttribLocationARB(), I cannot make out any place in the sourcecode of ogl2particle where the string "gl_Color" could even remotely be equal to "Velocity" What's going on here?

Now for the No such uniform named "Time". For this I also cannot make out any difference in setup and usage of related calls when comparing it to the setup and usage of other uniform variables like e.g. "Background". The passing of "Background" apparently works, since it doesn't complain about that uniform variable during runtime. So I don't know what's the deal here too.

Issues with GLSLdemo 3.6 in particular:

GLSLdemo 3.6 uses wxWindows as UI-toolkit and glew for platform-independent handling of OpenGL-extensions. This made it very easy to port it over to Linux. Just a simple Makefile is all that was needed to get it compile and run under Linux. Ok, I had to work-around/fix two small bugs (a gcc4 compiler issue in App.cpp:47 and a seg-fault for strstr() in Frame.cpp:99), but those are irrelevant to the general functionality of the program. After program-start it looks pretty much like this...



The scene spins around and can be manipulated with the mouse. Further manipulations can be done via the menu (e.g. loading other shader-sets, models, textures). Just the shaders are not rendered on the object sitting on the marble socket. It's just unshaded black or sometimes a shaded grid-like texture. When GLSLdemo is run one can display the shader-compiler console-output for the various shader-examples. For about 85% of the shaders I get errors about expected '}' like...

Code:
      Ready.
      Compiling '../shaders/default/Polkadot3D.vert'...
      Compiling '../shaders/default/Polkadot3D.frag'...
      Linking '../shaders/default/Polkadot3D.vert' with '../shaders/default/Polkadot3D.frag'...
      Failed link.
      Fragment info
      -------------
      Internal error: assembly compile error for fragment shader at offset 821:
      -- error message --
      line 30, column 26:  error: expected '}'
      -- internal assembly text --
      !!FP1.0
      # cgc version 1.3.0001, build date Jul 29 2005 13:26:34
      # command line args:
      #vendor NVIDIA Corporation
      #version 1.0.02
      #profile fp30
      #program main
      #semantic Spacing
      #semantic DotSize
      #semantic ModelColor
      #semantic PolkaDotColor
      #var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
      #var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
      #var float3 MCPosition : $vin.TEX1 : TEX1 : -1 : 1
      #var float3 Spacing :  :  : -1 : 1
      #var float DotSize :  :  : -1 : 1
      #var float3 ModelColor :  :  : -1 : 1
      #var float3 PolkaDotColor :  :  : -1 : 1
      DECLARE Spacing;
      DECLARE DotSize;
      DECLARE ModelColor;
      DECLARE PolkaDotColor;
      RCPR  R0.x, Spacing.x;
      RCPR  R0.z, Spacing.z;
      RCPR  R0.y, Spacing.y;
      MULR  R0.xyz, f[TEX1], R0;
      FLRR  R0.xyz, R0;
      MADR  R1.xyz, -R0, Spacing, f[TEX1];
      MOVR  R0.xyz, Spacing;
      MADR  R0.xyz, {-0,5, 0, 0, 0}.x, R0, R1;
      DP3R  R0.x, R0, R0;
      RSQR  R0.x, R0.x;
      RCPR  R0.x, R0.x;
      MOVR  R1.xyz, PolkaDotColor;
      ADDR  R1.xyz, -ModelColor, R1;
      SGER  H0.x, DotSize, R0;
      MADR  R0.xyz, H0.x, R1, ModelColor;
      MULR  R0.xyz, R0, f[TEX0].x;
      MOVR_SAT o[COLR].xyz, R0;
      MOVR  o[COLR].w, {1, 0, 0, 0}.x;
      END
      # 18 instructions, 2 R-regs, 1 H-regs
Even the shaders, which don't cause any error-messages, don't render at all on the object. I know what they should look like. I also ran GLSLdemo 3.6 on a GeForceFX 5200 powered (driven by some ForceWare 7x-series driver) notebook under Windows. There everything works (except for the 2 or 3 shaders with need a GeForce 6x00 or higher card). In addition to that, this shader-assembly doesn't look like GLSL-assembly generated by Cg-1.4.0 with using the -oglsl switch. In the output you can see that the profile fp30 is used. Isn't that just meant to be used for Cg-shaders? Nowhere in the code of GLSLdemo any profile is selected. Why does the driver-internal shader-compiler default to a Cg-profile, when it gets passed shader-code via GLSL utility-functions? I'm deeply confused now. Thus I wonder if there maybe a bug or two in the driver-internal shader-compiler.

Any help in solving those reported issues are greatly appreciated! If you're still missing information for resolving any of the mentioned quirks, just drop me a line.

For the record... here a few infos about the system I tried this stuff on:
  • Athlon-XP 2000+ machine
  • Fedora Core 4
  • GeForceFX 5900 (running nvidia-driver 1.0-7676)
  • Cg-1.4.0-3 installed
  • glew-1.3.3-2 installed
  • glew-devel-1.3.3-2 installed
  • wxGTK-devel-2.4.2-12 installed
  • wxGTK-2.4.2-12 installed
  • wxGTK-gl-2.4.2-12 installed
  • freeglut-2.2.0-16 installed
  • freeglut-devel-2.2.0-16 installed

Thanks in advance for your time and kind advice!

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-07-05, 05:41 PM   #2
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

<ranting/trolling/whining mode on>
I wish there was more visible help/support on the developer-side of things at nvidia... for the free/independent/small/hobby hackers under Linux out there. Especially regarding the new OpenGL 2.0 and GLSL-technology. There's hardly anything anymore for working with that GLSL/Cg/CgFX stuff directly under Linux and out of the box (I don't mind the "configure; make; make install" steps here). There used to be the NVSDK available via CVS for Linux (with most of the OpenGL-examples working... but by far not out of the box). By now not even that works anymore. The CVS-repository isn't reachable and there's also no place stating what's going on with it (see also here). Right now if someone wants to get into this s/he has to either be seasoned on this already (e.g. by coming from Windows, where resources, tools and platform-specifix documentation are good... just thinking of FXComposer and SDK-Browser) or before being able to start learing this has to debug/fix tons of things, because nothing works out of the box. Believe me there are people getting into IT and computing without ever touching Windows... for what ever reasons they may have. Though I'm not one of them. Having experienced this lack of attention myself now, it doesn't come as a surprise that so little is available (or being made available) for Linux... no GL-debuggers (like gDEBugger), graphical shader- and GL-profiling/performance analysis tools, easy to consume examples and sourcecode. One might say that things don't need to be "easy" as this is developer-stuff and usually these folks are above than average tech-savvy, but even these people like their work to be pleasant in order to be productive. The better the tools, the better the product... assuming enough talent and qualification of the developer! Even the best of their trade prefer good tools (watch John Carmack's keynote-speeck of QuakeCon 2005). The only tiny spark at the moment is the the GLSLdemo by 3Dlabs. What a sorry sight when compared to Windows or MacOS X! I wonder where all the developer-resources stuff is, which the big players use to make things like Maya & Co work smooth with gpu-shaders on Quadros running under Linux (this works good I assume, because why would CG-studios use Linux on their 3D-artists' desktops then). I really hope nVIDIA extends their cross-platform approach they rave about on the driver-side to the side of developer-resources too.
<ranting/trolling/whining mode off>

Here is a (very long, spread over several posts due to the 15000 character-per-post-limit of this forum-software) list of errors/messages reported by each shader from the GLSLdemo-3.6 ran on the system-setup mentioned in the above post (just the 30 shaders from the default.xml program-list). I also give a short description what this shader looks like when activated. This I also made available to 3Dlabs... let's see who constructively replies first nvidia or 3Dlabs.

Shader: Polkadot3D

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Ready.
Compiling '../shaders/default/Polkadot3D.vert'...

Compiling '../shaders/default/Polkadot3D.frag'...

Linking '../shaders/default/Polkadot3D.vert' with '../shaders/default/Polkadot3D.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 821:
-- error message --
line 30, column 26:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Spacing
#semantic DotSize
#semantic ModelColor
#semantic PolkaDotColor
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 MCPosition : $vin.TEX1 : TEX1 : -1 : 1
#var float3 Spacing :  :  : -1 : 1
#var float DotSize :  :  : -1 : 1
#var float3 ModelColor :  :  : -1 : 1
#var float3 PolkaDotColor :  :  : -1 : 1
DECLARE Spacing;
DECLARE DotSize;
DECLARE ModelColor;
DECLARE PolkaDotColor;
RCPR  R0.x, Spacing.x;
RCPR  R0.z, Spacing.z;
RCPR  R0.y, Spacing.y;
MULR  R0.xyz, f[TEX1], R0;
FLRR  R0.xyz, R0;
MADR  R1.xyz, -R0, Spacing, f[TEX1];
MOVR  R0.xyz, Spacing;
MADR  R0.xyz, {-0,5, 0, 0, 0}.x, R0, R1;
DP3R  R0.x, R0, R0;
RSQR  R0.x, R0.x;
RCPR  R0.x, R0.x;
MOVR  R1.xyz, PolkaDotColor;
ADDR  R1.xyz, -ModelColor, R1;
SGER  H0.x, DotSize, R0;
MADR  R0.xyz, H0.x, R1, ModelColor;
MULR  R0.xyz, R0, f[TEX0].x;
MOVR_SAT o[COLR].xyz, R0;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 18 instructions, 2 R-regs, 1 H-regs
--------
Shader: Toon

Looks: the Klein-bottle is unshaded solid black

Code:
Compiling '../shaders/default/Toon.vert'...

Compiling '../shaders/default/Toon.frag'...

Linking '../shaders/default/Toon.vert' with '../shaders/default/Toon.frag'...
Validating...
--------
Shader: VertexNoise

Looks: the Klein-bottle is unshaded solid black

Code:
Compiling '../shaders/default/VertexNoise.vert'...

Compiling '../shaders/default/VertexNoise.frag'...

Linking '../shaders/default/VertexNoise.vert' with '../shaders/default/VertexNoise.frag'...
Validating...

Unable to load uniform 'offset'.
Unable to load uniform 'scaleIn'.
Unable to load uniform 'scaleOut'.
--------
Shader: Inferno

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Inferno.vert'...

Compiling '../shaders/default/Inferno.frag'...

Linking '../shaders/default/Inferno.vert' with '../shaders/default/Inferno.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 903:
-- error message --
line 34, column 28:  error: expected '}'
line 36, column 28:  error: expected '}'
line 39, column 33:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Offset
#semantic FireColor1
#semantic FireColor2
#semantic Teapot
#semantic Extent
#semantic sampler3d
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float3 Position : $vin.TEX0 : TEX0 : -1 : 1
#var float Offset :  :  : -1 : 1
#var float3 FireColor1 :  :  : -1 : 1
#var float3 FireColor2 :  :  : -1 : 1
#var bool Teapot :  :  : -1 : 0
#var float Extent :  :  : -1 : 1
#var sampler3D sampler3d :  : texunit 0 : -1 : 1
DECLARE Offset;
DECLARE Extent;
DECLARE FireColor1;
DECLARE FireColor2;
TEX   R0.yw, f[TEX0], TEX0, 3D;
ADDR  R0.x, f[TEX0].y, -R0.w;
ADDR  R1.xz, f[TEX0], R0.y;
ADDR  R1.y, R0.x, Offset.x;
TEX   R0, R1, TEX0, 3D;
ADDR  R0.x, R0, R0.y;
ADDR  R0.x, R0, R0.z;
ADDR  R0.x, R0, R0.w;
MADR  R0.x, R0, {1,5, -0,35, 0, 0}, {1,5, -0,35, 0, 0}.y;
ADDR  R0.y, f[TEX0], Extent.x;
MULR  R0.y, R0, {0,65, 0, 0, 0}.x;
FRCR  R0.y, R0;
MOVR  R1.xyz, FireColor2;
MULR_SAT R0.x, |R0|, {1,95, 0, 0, 0};
ADDR  R1.xyz, -FireColor1, R1;
MADR  R1.xyz, R0.x, R1, FireColor1;
ADDR  R0.z, -R0.y, {1, 0, 0, 0}.x;
MULR  R1.xyz, R1, R0.z;
MADR  R0.x, -R0.y, R0, {1, 0, 0, 0};
MULR_SAT o[COLR].xyz, R1, {2, 0, 0, 0}.x;
MULR  o[COLR].w, R0.x, R0.x;
END
# 21 instructions, 2 R-regs, 0 H-regs
--------
Shader: Brick

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Brick.vert'...

Compiling '../shaders/default/Brick.frag'...

Linking '../shaders/default/Brick.vert' with '../shaders/default/Brick.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 740:
-- error message --
line 26, column 29:  error: expected '}'
line 28, column 29:  error: expected '}'
line 30, column 33:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic BrickColor
#semantic MortarColor
#semantic BrickSize
#semantic BrickPct
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float3 BrickColor :  :  : -1 : 1
#var float3 MortarColor :  :  : -1 : 1
#var float2 BrickSize :  :  : -1 : 1
#var float2 BrickPct :  :  : -1 : 1
#var float2 MCposition : $vin.TEX0 : TEX0 : -1 : 1
#var float LightIntensity : $vin.TEX1 : TEX1 : -1 : 1
DECLARE BrickSize;
DECLARE BrickPct;
DECLARE MortarColor;
DECLARE BrickColor;
RCPR  R0.y, BrickSize.y;
RCPR  R0.x, BrickSize.x;
MULR  R0.zw, f[TEX0].xyxy, R0.xyxy;
MULR  R0.x, R0.w, {0,5, 0, 0, 0};
FRCR  R0.y, R0.x;
SGTRC HC.x, R0.y, {0,5, 0, 0, 0};
MOVR  R0.x, R0.z;
ADDR  R0.x(GT), R0.z, {0,5, 0, 0, 0};
MOVR  R0.y, R0.w;
FRCR  R0.xy, R0;
SGER  H0.xy, BrickPct, R0;
MOVR  R0.yzw, BrickColor.xxyz;
MULR  R0.x, H0, H0.y;
ADDR  R0.yzw, -MortarColor.xxyz, R0;
MADR  R0.xyz, R0.x, R0.yzww, MortarColor;
MULR  o[COLR].xyz, R0, f[TEX1].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 17 instructions, 1 R-regs, 1 H-regs
--------
Shader: Cloud1

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Cloud1.vert'...

Compiling '../shaders/default/Cloud1.frag'...

Linking '../shaders/default/Cloud1.vert' with '../shaders/default/Cloud1.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 824:
-- error message --
line 30, column 29:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Noise
#semantic Offset
#semantic SkyColor
#semantic CloudColor
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 MCposition : $vin.TEX1 : TEX1 : -1 : 1
#var sampler3D Noise :  : texunit 0 : -1 : 1
#var float3 Offset :  :  : -1 : 1
#var float3 SkyColor :  :  : -1 : 1
#var float3 CloudColor :  :  : -1 : 1
DECLARE Offset;
DECLARE SkyColor;
DECLARE CloudColor;
ADDR  R0.xyz, f[TEX1], Offset;
TEX   R0, R0, TEX0, 3D;
ADDR  R0.x, R0, R0.y;
ADDR  R0.x, R0, R0.z;
MOVR  R1.xyz, CloudColor;
ADDR  R1.xyz, -SkyColor, R1;
ADDR  R0.x, R0, R0.w;
MULR  R0.xyz, R0.x, R1;
MULR  R0.xyz, R0, {1,5, 0, 0, 0}.x;
ADDR  R0.xyz, R0, SkyColor;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 12 instructions, 2 R-regs, 0 H-regs
--------
Shader: Cloud2

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Cloud2.vert'...

Compiling '../shaders/default/Cloud2.frag'...

Linking '../shaders/default/Cloud2.vert' with '../shaders/default/Cloud2.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 655:
-- error message --
line 23, column 29:  error: expected '}'
line 24, column 29:  error: expected '}'
line 30, column 28:  error: expected '}'
line 32, column 33:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Noise
#semantic Offset
#semantic SkyColor
#semantic CloudColor
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 MCposition : $vin.TEX1 : TEX1 : -1 : 1
#var sampler3D Noise :  : texunit 0 : -1 : 1
#var float3 Offset :  :  : -1 : 1
#var float3 SkyColor :  :  : -1 : 1
#var float3 CloudColor :  :  : -1 : 1
DECLARE Offset;
DECLARE CloudColor;
DECLARE SkyColor;
ADDR  R0.xyz, f[TEX1], Offset;
ADDR  R0.xyz, R0, {0,5, 0, 0, 0}.x;
MULR  R0.xyz, R0, {1,2, 0, 0, 0}.x;
TEX   R0, R0, TEX0, 3D;
ADDR  R0.x, R0, R0.y;
ADDR  R0.x, R0, R0.z;
ADDR  R0.x, R0, R0.w;
MOVR  R0.yzw, SkyColor.xxyz;
MADR  R0.x, R0, {3,4, -1, 0, 0}, {3,4, -1, 0, 0}.y;
ADDR  R0.yzw, -CloudColor.xxyz, R0;
MULR_SAT R0.x, |R0|, {1,95, 0, 0, 0};
MADR  R0.xyz, R0.x, R0.yzww, CloudColor;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 14 instructions, 1 R-regs, 0 H-regs
--------
Shader: Fire

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Fire.vert'...

Compiling '../shaders/default/Fire.frag'...

Linking '../shaders/default/Fire.vert' with '../shaders/default/Fire.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 795:
-- error message --
line 29, column 31:  error: expected '}'
line 30, column 30:  error: expected '}'
line 31, column 29:  error: expected '}'
line 34, column 34:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Noise
#semantic Color1
#semantic Color2
#semantic NoiseScale
#semantic Offset
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 MCposition : $vin.TEX1 : TEX1 : -1 : 1
#var sampler3D Noise :  : texunit 0 : -1 : 1
#var float3 Color1 :  :  : -1 : 1
#var float3 Color2 :  :  : -1 : 1
#var float NoiseScale :  :  : -1 : 1
#var float3 Offset :  :  : -1 : 1
DECLARE NoiseScale;
DECLARE Offset;
DECLARE Color1;
DECLARE Color2;
ADDR  R0.xyz, f[TEX1], Offset;
MULR  R0.xyz, R0, NoiseScale.x;
TEX   R0, R0, TEX0, 3D;
MOVR  R1.xyz, Color2;
ADDR  R0.z, R0, {-0,0625, 0, 0, 0}.x;
ADDR  R0.y, R0, {-0,125, 0, 0, 0}.x;
ADDR  R0.x, R0, {-0,25, 0, 0, 0};
ADDR  R0.x, |R0|, |R0.y|;
ADDR  R0.x, R0, |R0.z|;
ADDR  R0.y, R0.w, {-0,03125, 0, 0, 0}.x;
ADDR  R0.x, R0, |R0.y|;
ADDR  R1.xyz, -Color1, R1;
MULR_SAT R0.x, R0, {6, 0, 0, 0};
MADR  R0.xyz, R0.x, R1, Color1;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 16 instructions, 2 R-regs, 0 H-regs
To be continued in the next post.

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-07-05, 06:02 PM   #3
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Shader: Wood1

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it


Code:
Compiling '../shaders/default/Wood1.vert'...

Compiling '../shaders/default/Wood1.frag'...

Linking '../shaders/default/Wood1.vert' with '../shaders/default/Wood1.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 685:
-- error message --
line 23, column 29:  error: expected '}'
line 25, column 29:  error: expected '}'
line 31, column 29:  error: expected '}'
line 37, column 29:  error: expected '}'
line 46, column 31:  error: expected '}'
line 51, column 36:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic GrainSizeRecip
#semantic DarkColor
#semantic spread
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float GrainSizeRecip :  :  : -1 : 1
#var float3 DarkColor :  :  : -1 : 1
#var float3 spread :  :  : -1 : 1
#var float lightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 Position : $vin.TEX1 : TEX1 : -1 : 1
DECLARE GrainSizeRecip;
DECLARE DarkColor;
DECLARE spread;
MULR  R0.xy, f[TEX1].xzzw, {10, 0, 0, 0}.x;
FLRR  R0.xy, R0;
MADR  R0.xy, f[TEX1].xzzw, {10, 0, 0, 0}.x, -R0;
ADDR  R0.xy, R0, {-0,5, 0, 0, 0}.x;
MULR  R0.xy, R0, R0;
MADR  R0.xy, R0, {0,12, 0, 0, 0}.x, f[TEX1].xzzw;
MULR  R0.y, R0, R0;
MADR  R0.x, R0, R0, R0.y;
MULR  R1.x, R0, GrainSizeRecip;
FRCR  R0.y, R1.x;
MOVR  R0.x, R0.y;
SGTRC HC.x, R0.y, {0,5, 0, 0, 0};
ADDR  R0.x(GT), -R0.y, {1, 0, 0, 0};
MULR  R0.y, R1.x, {7, 0, 0, 0}.x;
FRCR  R0.y, R0;
MULR  R1.x, R1, {47, 0, 0, 0};
MOVR  R0.w, R0.y;
SGTRC HC.x, R0.y, {0,5, 0, 0, 0};
ADDR  R0.w(GT.x), -R0.y, {1, 0, 0, 0}.x;
MULR  R0.xyz, R0.x, spread;
ADDR  R0.xyz, R0, DarkColor;
MADR  R2.xyz, -R0.w, spread, R0;
ADDR  R0.w, f[TEX1].z, f[TEX1].x;
FRCR  R0.w, R0;
MULR  R1.y, R0.w, {20, 0, 0, 0}.x;
FLRR  R1.y, R1;
MADR  R1.w, R1.y, {0,05, 0,006, 0, 0}.x, {0,05, 0,006, 0, 0}.y;
FRCR  R1.x, R1;
MOVR  R0.xyz, R2;
MULR  R1.xyz, R1.x, spread;
SLTRC HC.x, R0.w, R1.w;
MADR  R0.xyz(GT.x), -R1, {0,6, 0, 0, 0}.x, R2;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 34 instructions, 3 R-regs, 0 H-regs
--------
Shader: Wood2

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Wood2.vert'...

Compiling '../shaders/default/Wood2.frag'...

Linking '../shaders/default/Wood2.vert' with '../shaders/default/Wood2.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1739:
-- error message --
line 61, column 27:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Noise
#semantic LightWoodColor
#semantic DarkWoodColor
#semantic RingFreq
#semantic LightGrains
#semantic DarkGrains
#semantic GrainThreshold
#semantic NoiseScale
#semantic Noisiness
#semantic GrainScale
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 MCposition : $vin.TEX1 : TEX1 : -1 : 1
#var sampler3D Noise :  : texunit 0 : -1 : 1
#var float3 LightWoodColor :  :  : -1 : 1
#var float3 DarkWoodColor :  :  : -1 : 1
#var float RingFreq :  :  : -1 : 1
#var float LightGrains :  :  : -1 : 1
#var float DarkGrains :  :  : -1 : 0
#var float GrainThreshold :  :  : -1 : 1
#var float3 NoiseScale :  :  : -1 : 1
#var float Noisiness :  :  : -1 : 1
#var float GrainScale :  :  : -1 : 1
DECLARE NoiseScale;
DECLARE Noisiness;
DECLARE RingFreq;
DECLARE LightWoodColor;
DECLARE DarkWoodColor;
DECLARE GrainScale;
DECLARE GrainThreshold;
DECLARE LightGrains;
MULR  R0.xyz, f[TEX1], NoiseScale;
TEX   R0.xyz, R0, TEX0, 3D;
MULR  R1.xyw, R0.xyzz, Noisiness.x;
ADDR  R0.xy, f[TEX1].xzzw, R1.xwzw;
MULR  R0.y, R0, R0;
MADR  R0.x, R0, R0, R0.y;
RSQR  R0.x, R0.x;
RCPR  R0.x, R0.x;
MADR  R0.x, R0, RingFreq, R1;
ADDR  R0.x, R0, R1.y;
ADDR  R0.x, R0, R1.w;
FRCR  R0.x, R0;
MULR  R0.x, R0, {2, 0, 0, 0};
MOVR  R1.xyz, LightWoodColor;
MOVR  R0.w, R0.x;
SGTRC HC.x, R0, {1, 0, 0, 0};
ADDR  R0.w(GT.x), -R0.x, {2, 0, 0, 0}.x;
MOVR  R0.xyz, DarkWoodColor;
ADDR  R0.xyz, -LightWoodColor, R0;
MADR  R2.xyz, R0.w, R0, LightWoodColor;
ADDR  R0.w, f[TEX1].x, f[TEX1].z;
MULR  R0.w, R0, GrainScale.x;
ADDR  R0.w, R0, {0,5, 0, 0, 0}.x;
FRCR  R0.w, R0;
MOVR  R0.xyz, R2;
MULR  R1.xyz, LightGrains.x, R1;
MULR  R1.w, R1, R0;
SLTRC HC.x, R0.w, GrainThreshold;
MADR  R0.xyz(NE.x), R1, R1.w, R2;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 31 instructions, 3 R-regs, 0 H-regs
--------
Shader: Lattice

Looks: the Klein-bottle is unshaded solid black

Code:
Compiling '../shaders/default/Lattice.vert'...

Compiling '../shaders/default/Lattice.frag'...

Linking '../shaders/default/Lattice.vert' with '../shaders/default/Lattice.frag'...
Validating...
--------
Shader: Eroded

Looks: the Klein-bottle is smooth shaded greyish with a black grid-like texture on it

Code:
Compiling '../shaders/default/Eroded.vert'...

Compiling '../shaders/default/Eroded.frag'...

Linking '../shaders/default/Eroded.vert' with '../shaders/default/Eroded.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 537:
-- error message --
line 17, column 34:  error: expected '}'
line 18, column 29:  error: expected '}'
line 25, column 27:  error: expected '}'
line 26, column 28:  error: expected '}'
line 28, column 33:  error: expected '}'
line 30, column 30:  error: expected '}'
line 31, column 28:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic Offset
#semantic sampler3d
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float lightIntensity : $vin.TEX0 : TEX0 : -1 : 1
#var float3 Position : $vin.TEX1 : TEX1 : -1 : 1
#var float3 Offset :  :  : -1 : 1
#var sampler3D sampler3d :  : texunit 0 : -1 : 1
#var <none> $kill_0000 : $vout.$kill : $kill : -1 : 0
DECLARE Offset;
ADDR  R0.xyz, f[TEX1], {0,5, 0, 0, 0}.x;
MULR  R0.xyz, R0, {1,2, 0, 0, 0}.x;
TEX   R0, R0, TEX0, 3D;
ADDR  R0.x, R0, R0.y;
ADDR  R0.x, R0, R0.z;
ADDR  R0.y, -Offset.x, -Offset;
ADDR  R0.y, R0, -Offset.z;
ADDR  R0.x, R0, R0.w;
ADDR  R0.y, R0, {0,5, 0, 0, 0}.x;
MADR  R0.x, R0, {1,5, -1, 0, 0}, {1,5, -1, 0, 0}.y;
FRCR  R0.y, R0;
MULR_SAT R0.x, |R0|, {1,95, 0, 0, 0};
SLTRC HC.x, R0, R0.y;
MULR  R0.xyz, R0.x, {0,6, 0,7, 0,8, 0};
ADDR  R0.xyz, R0, {0,2, 0,1, 0, 0};
KIL   GT.x;
MULR_SAT o[COLR].xyz, R0, f[TEX0].x;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 18 instructions, 1 R-regs, 0 H-regs
--------
Shader: Granite

Looks: the Klein-bottle is just smooth shaded greyish

Code:
Compiling '../shaders/default/Granite.vert'...

Compiling '../shaders/default/Granite.frag'...

Linking '../shaders/default/Granite.vert' with '../shaders/default/Granite.frag'...
Validating...
--------
Shader: Gooch

Looks: the Klein-bottle is per-pixel specular-shaded and solid black

Code:
Compiling '../shaders/default/Gooch.vert'...

Compiling '../shaders/default/Gooch.frag'...

Linking '../shaders/default/Gooch.vert' with '../shaders/default/Gooch.frag'...
Validating...
--------
Shader: EnvMap

Looks: the Klein-bottle is smooth shaded with dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/EnvMap.vert'...

Compiling '../shaders/default/EnvMap.frag'...

Linking '../shaders/default/EnvMap.vert' with '../shaders/default/EnvMap.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 912:
-- error message --
line 33, column 29:  error: expected '}'
line 37, column 34:  error: expected '}'
line 39, column 32:  error: expected '}'
line 42, column 33:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic BaseColor
#semantic MixRatio
#semantic EnvMap
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float3 BaseColor :  :  : -1 : 1
#var float MixRatio :  :  : -1 : 1
#var sampler2D EnvMap :  : texunit 0 : -1 : 1
#var float3 Normal : $vin.TEX0 : TEX0 : -1 : 1
#var float3 EyeDir : $vin.TEX1 : TEX1 : -1 : 1
#var float LightIntensity : $vin.TEX2 : TEX2 : -1 : 1
DECLARE BaseColor;
DECLARE MixRatio;
MOVR  R0.xyz, f[TEX1];
DP3R  R0.x, f[TEX0], R0;
MULR  R0.xyz, f[TEX0], R0.x;
MULR  R0.xyw, R0.xyzz, {2, 0, 0, 0}.x;
ADDR  R1.xyz, f[TEX1], -R0.xyww;
MOVR  R0.xz, R1;
MOVR  R0.y, {0, 0, 0, 0}.x;
DP3R  R0.x, R0, R0;
DP3R  R0.y, R1, R1;
RSQR  R0.y, R0.y;
RSQR  R0.x, R0.x;
MULR  R0.x, R0, R1;
MULR  R1.w, R0.y, R1.y;
MULR  R1.z, R0.x, {0,5, 0, 0, 0}.x;
MOVR  R0.xy, R1.zwzw;
ADDR  R1.xy, R1.zwzw, {1, 0, 0, 0}.x;
SGERC HC.x, f[TEX1].z, R0.w;
MULR  R0.xy(GT.x), R1, {0,5, 0, 0, 0}.x;
MOVR  R1.x, R0;
MADR  R1.x(EQ), -R0, {0,5, 1, 0, 0}, {0,5, 1, 0, 0}.y;
MOVR  R0.x, R0.y;
ADDR  R0.y, R1.w, {1, 0, 0, 0}.x;
MULR  R0.x(EQ), R0.y, {0,5, 0, 0, 0};
MOVR  R1.y, R0.x;
TEX   R0, R1, TEX0, 2D;
MADR  R1.xyz, f[TEX2].x, BaseColor, -R0;
MADR  o[COLR].xyz, R1, MixRatio.x, R0;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 28 instructions, 2 R-regs, 0 H-regs
--------
Shader: Earth

Looks: the Klein-bottle is smooth shaded with dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/Earth.vert'...

Compiling '../shaders/default/Earth.frag'...

Linking '../shaders/default/Earth.vert' with '../shaders/default/Earth.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 932:
-- error message --
line 29, column 34:  error: expected '}'
line 33, column 32:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic EarthDay
#semantic EarthNight
#semantic EarthCloudGloss
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var sampler2D EarthDay :  : texunit 1 : -1 : 1
#var sampler2D EarthNight :  : texunit 2 : -1 : 1
#var sampler2D EarthCloudGloss :  : texunit 0 : -1 : 1
#var float Diffuse : $vin.TEX0 : TEX0 : -1 : 1
#var float3 Specular : $vin.TEX1 : TEX1 : -1 : 1
#var float2 TexCoord : $vin.TEX2 : TEX2 : -1 : 1
TEX   R2, f[TEX2], TEX0, 2D;
ADDR  R1.w, -R2.x, {1, 0, 0, 0}.x;
MULR  R1.xyz, f[TEX1], R2.y;
TEX   R0, f[TEX2], TEX1, 2D;
MADR  R1.xyz, R0, f[TEX0].x, R1;
TEX   R0, f[TEX2], TEX2, 2D;
MULR  R0.w, R2.x, f[TEX0].x;
MADR  R1.xyz, R1, R1.w, R0.w;
MULR  R0.xyz, R0, R1.w;
MULR  R0.xyz, R0, {2, 0, 0, 0}.x;
ADDR  R2.xyz, R1, -R0;
ADDR  R0.w, f[TEX0].x, {0,1, 0, 0, 0}.x;
MULR  R2.xyz, R0.w, R2;
MULR  R2.xyz, R2, {5, 0, 0, 0}.x;
MOVR  o[COLR].xyz, R1;
SLERC HC.x, f[TEX0], {0,1, 0, 0, 0};
ADDR  o[COLR].xyz(GT.x), R0, R2;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 18 instructions, 3 R-regs, 0 H-regs
--------
Shader: Mandel (it's ok that this shader doesn't work because my GeForceFX 5900 doesn't support the branching)

Looks: the Klein-bottle is smooth shaded with dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/Mandel.vert'...

Compiling '../shaders/default/Mandel.frag'...

Linking '../shaders/default/Mandel.vert' with '../shaders/default/Mandel.frag'...
Failed link.
Fragment info
-------------
(40) : error C5013: profile does not support "for" statements
--------
Shader: Julia (it's ok that this shader doesn't work because my GeForceFX 5900 doesn't support the branching)

Looks: the Klein-bottle is smooth shaded with dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/Julia.vert'...

Compiling '../shaders/default/Julia.frag'...

Linking '../shaders/default/Julia.vert' with '../shaders/default/Julia.frag'...
Failed link.
Fragment info
-------------
(42) : error C5013: profile does not support "for" statements
Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-07-05, 06:12 PM   #4
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Shader: Wooble

Looks: the Klein-bottle is smooth shaded with dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/Wobble.vert'...

Compiling '../shaders/default/Wobble.frag'...

Linking '../shaders/default/Wobble.vert' with '../shaders/default/Wobble.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1035:
-- error message --
line 33, column 33:  error: expected '}'
line 35, column 31:  error: expected '}'
line 37, column 32:  error: expected '}'
line 38, column 36:  error: expected '}'
line 40, column 31:  error: expected '}'
line 41, column 37:  error: expected '}'
line 43, column 33:  error: expected '}'
line 44, column 37:  error: expected '}'
line 46, column 32:  error: expected '}'
line 47, column 40:  error: expected '}'
line 51, column 33:  error: expected '}'
line 53, column 29:  error: expected '}'
line 55, column 30:  error: expected '}'
line 56, column 38:  error: expected '}'
line 58, column 33:  error: expected '}'
line 59, column 35:  error: expected '}'
line 61, column 31:  error: expected '}'
line 62, column 39:  error: expected '}'
line 64, column 34:  error: expected '}'
line 65, column 38:  error: expected '}'
line 70, column 36:  error: expected '}'
line 71, column 36:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic StartRad
#semantic Freq
#semantic Amplitude
#semantic WobbleTex
#var float4 gl_TexCoord[0] : $vin.TEX0 : TEX0 : -1 : 1
#var float4 gl_TexCoord[1] :  :  : -1 : 0
#var float4 gl_TexCoord[2] :  :  : -1 : 0
#var float4 gl_TexCoord[3] :  :  : -1 : 0
#var float4 gl_TexCoord[4] :  :  : -1 : 0
#var float4 gl_TexCoord[5] :  :  : -1 : 0
#var float4 gl_TexCoord[6] :  :  : -1 : 0
#var float4 gl_TexCoord[7] :  :  : -1 : 0
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float LightIntensity : $vin.TEX1 : TEX1 : -1 : 1
#var float StartRad :  :  : -1 : 1
#var float2 Freq :  :  : -1 : 1
#var float2 Amplitude :  :  : -1 : 1
#var sampler2D WobbleTex :  : texunit 0 : -1 : 1
DECLARE StartRad;
DECLARE Freq;
DECLARE Amplitude;
ADDR  R0.x, f[TEX0], f[TEX0].y;
ADDR  R0.x, R0, StartRad;
ADDR  R0.x, R0, {-1, 0, 0, 0};
MULR  R0.x, R0, Freq;
MULR  R0.x, R0, {0,1591596, 0, 0, 0};
FRCR  R0.x, R0;
MULR  R0.y, R0.x, {6,283, 0, 0, 0}.x;
MOVR  R0.x, R0.y;
SGTRC HC.x, R0.y, {3,1415, 0, 0, 0};
ADDR  R0.x(GT), R0.y, {-6,283, 0, 0, 0};
MOVR  R0.y, R0.x;
SLTRC HC.x, R0, {-3,1415, 0, 0, 0};
ADDR  R0.y(GT.x), R0.x, {6,283, 0, 0, 0}.x;
MOVR  R0.x, R0.y;
SGTRC HC.x, R0.y, {1,57075, 0, 0, 0};
ADDR  R0.x(GT), -R0.y, {3,1415, 0, 0, 0};
MOVR  R0.y, R0.x;
SLTRC HC.x, R0, {-1,57075, 0, 0, 0};
ADDR  R0.y(GT.x), -R0.x, {-3,1415, 0, 0, 0}.x;
ADDR  R0.x, f[TEX0], -f[TEX0].y;
ADDR  R0.x, R0, StartRad;
MULR  R0.x, R0, Freq.y;
MULR  R0.x, R0, {0,1591596, 0, 0, 0};
FRCR  R0.x, R0;
MULR  R0.x, R0, {6,283, 0, 0, 0};
MOVR  R0.z, R0.x;
SGTRC HC.x, R0, {3,1415, 0, 0, 0};
ADDR  R0.z(GT.x), R0.x, {-6,283, 0, 0, 0}.x;
MOVR  R0.x, R0.z;
SLTRC HC.x, R0.z, {-3,1415, 0, 0, 0};
ADDR  R0.x(GT), R0.z, {6,283, 0, 0, 0};
MOVR  R0.z, R0.x;
SGTRC HC.x, R0, {1,57075, 0, 0, 0};
ADDR  R0.z(GT.x), -R0.x, {3,1415, 0, 0, 0}.x;
MOVR  R0.x, R0.z;
SLTRC HC.x, R0.z, {-1,57075, 0, 0, 0};
ADDR  R0.x(GT), -R0.z, {-3,1415, 0, 0, 0};
MULR  R0.z, R0.y, R0.y;
MULR  R0.w, R0.z, R0.y;
MULR  R0.z, R0.x, R0.x;
MULR  R0.z, R0, R0.x;
MADR  R0.y, -R0.w, {0,1666667, 0, 0, 0}.x, R0;
MADR  R0.x, -R0.z, {0,1666667, 0, 0, 0}, R0;
MULR  R0.z, R0.y, Amplitude.x;
MULR  R0.w, R0.x, Amplitude.y;
ADDR  R0.xy, R0.zwzw, f[TEX0];
TEX   R0, R0, TEX0, 2D;
MULR  o[COLR].xyz, R0, f[TEX1].x;
MOVR  o[COLR].w, R0;
END
# 49 instructions, 1 R-regs, 0 H-regs
--------
Shader: Skinning

Looks: a unshaded solid black character with moving arms, legs and feelers

Code:
Compiling '../shaders/default/Skinning.vert'...

Compiling '../shaders/default/Skinning.frag'...

Linking '../shaders/default/Skinning.vert' with '../shaders/default/Skinning.frag'...
Validating...
--------
Shader: Bumpmap

Looks: probably a static part of that character smooth-shaded with that dark low-noise red/green/orange color texture

Code:
Compiling '../shaders/default/Bumpmap.vert'...

Compiling '../shaders/default/Bumpmap.frag'...

Linking '../shaders/default/Bumpmap.vert' with '../shaders/default/Bumpmap.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1037:
-- error message --
line 31, column 30:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic NormalMap
#semantic DiffuseFactor
#semantic SpecularFactor
#semantic BaseColor
#var float4 gl_TexCoord[0] : $vin.TEX0 : TEX0 : -1 : 1
#var float4 gl_TexCoord[1] :  :  : -1 : 0
#var float4 gl_TexCoord[2] :  :  : -1 : 0
#var float4 gl_TexCoord[3] :  :  : -1 : 0
#var float4 gl_TexCoord[4] :  :  : -1 : 0
#var float4 gl_TexCoord[5] :  :  : -1 : 0
#var float4 gl_TexCoord[6] :  :  : -1 : 0
#var float4 gl_TexCoord[7] :  :  : -1 : 0
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var sampler2D NormalMap :  : texunit 0 : -1 : 1
#var float DiffuseFactor :  :  : -1 : 1
#var float SpecularFactor :  :  : -1 : 1
#var float3 BaseColor :  :  : -1 : 1
#var float3 lightDir : $vin.TEX1 : TEX1 : -1 : 1
#var float3 viewDir : $vin.TEX2 : TEX2 : -1 : 1
DECLARE DiffuseFactor;
DECLARE SpecularFactor;
DECLARE BaseColor;
TEX   R0, f[TEX0], TEX0, 2D;
ADDR  R0.xyz, R0, {-0,5, 0, 0, 0}.x;
MULR  R0.xyz, R0, {2, 0, 0, 0}.x;
MOVR  R0.y, -R0;
DP3R  R0.w, f[TEX1], R0;
MULR  R0.xyz, R0.w, R0;
MADR  R0.xyz, -R0, {2, 0, 0, 0}.x, f[TEX1];
DP3R  R0.x, R0, f[TEX2];
MAXR  R0.x, R0, {0, 0, 0, 0};
POWR  R0.x, R0.x, {6, 0, 0, 0}.x;
MULR  R0.x, R0, SpecularFactor;
MINR  R0.x, R0, {1, 0, 0, 0};
MAXR  R0.y, R0.w, {0, 0, 0, 0}.x;
MADR  R0.x, R0.y, DiffuseFactor, R0;
MULR_SAT o[COLR].xyz, R0.x, BaseColor;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 16 instructions, 1 R-regs, 0 H-regs
--------
Shader: TorusMorph

Looks: the Klein-bottle is unshaded solid black and being scaled up and down

Code:
Compiling '../shaders/default/TorusMorph.vert'...

Compiling '../shaders/default/TorusMorph.frag'...

Linking '../shaders/default/TorusMorph.vert' with '../shaders/default/TorusMorph.frag'...
Validating...
--------
Shader: SphereMorph

Looks: the Klein-bottle is unshaded solid black and being scaled up and down

Code:
Compiling '../shaders/default/SphereMorph.vert'...

Compiling '../shaders/default/SphereMorph.frag'...

Linking '../shaders/default/SphereMorph.vert' with '../shaders/default/SphereMorph.frag'...
Validating...
--------
Shader: ParticleSimple

Looks: no object except for the background and podium is rendered and the frame-rate is very stuttering

Code:
Compiling '../shaders/default/ParticleSimple.vert'...

Compiling '../shaders/default/ParticleSimple.frag'...

Linking '../shaders/default/ParticleSimple.vert' with '../shaders/default/ParticleSimple.frag'...
Validating...
--------
Shader: ParticleWave

Looks: a sinus/cosine wave of particles colored gradually from yellow to orange/red and the frame-rate is even worse (more like seconds per frame)

Code:
Compiling '../shaders/default/ParticleWave.vert'...

Compiling '../shaders/default/ParticleWave.frag'...

Linking '../shaders/default/ParticleWave.vert' with '../shaders/default/ParticleWave.frag'...
Validating...
--------
Shader: ParticleFountain

Looks: a fountain of particles gradually colored from yellow to orange/red... frame-rate is as bad as before

Code:
Compiling '../shaders/default/ParticleFountain.vert'...

Compiling '../shaders/default/ParticleFountain.frag'...

Linking '../shaders/default/ParticleFountain.vert' with '../shaders/default/ParticleFountain.frag'...
Validating...
--------
Shader: Glass

Looks: sphere of static particles which are randomly colored, frame-rate is smooth again

Code:
Compiling '../shaders/default/Glass.vert'...

Compiling '../shaders/default/Glass.frag'...

Linking '../shaders/default/Glass.vert' with '../shaders/default/Glass.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1242:
-- error message --
line 45, column 27:  error: expected '}'
line 49, column 39:  error: expected '}'
line 51, column 32:  error: expected '}'
line 54, column 33:  error: expected '}'
line 69, column 28:  error: expected '}'
line 70, column 37:  error: expected '}'
line 73, column 38:  error: expected '}'
line 74, column 36:  error: expected '}'
line 80, column 27:  error: expected '}'
line 81, column 27:  error: expected '}'
line 84, column 34:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic BaseColor
#semantic Depth
#semantic MixRatio
#semantic FrameWidth
#semantic FrameHeight
#semantic EnvMap
#semantic RefractionMap
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float3 BaseColor :  :  : -1 : 1
#var float Depth :  :  : -1 : 1
#var float MixRatio :  :  : -1 : 1
#var float FrameWidth :  :  : -1 : 1
#var float FrameHeight :  :  : -1 : 1
#var sampler2D EnvMap :  : texunit 0 : -1 : 1
#var sampler2D RefractionMap :  : texunit 1 : -1 : 1
#var float3 Normal : $vin.TEX0 : TEX0 : -1 : 1
#var float3 EyeDir : $vin.TEX1 : TEX1 : -1 : 1
#var float4 EyePos : $vin.TEX2 : TEX2 : -1 : 1
#var float LightIntensity : $vin.TEX3 : TEX3 : -1 : 1
DECLARE MixRatio;
DECLARE Depth;
DECLARE FrameWidth;
DECLARE FrameHeight;
DECLARE BaseColor;
MOVR  R0.xyz, f[TEX1];
DP3R  R0.x, f[TEX0], R0;
MULR  R0.xyz, f[TEX0], R0.x;
MULR  R2.xyz, R0, {2, 0, 0, 0}.x;
ADDR  R1.xyz, f[TEX1], -R2;
MOVR  R0.xz, R1;
MOVR  R0.y, {0, 0, 0, 0}.x;
DP3R  R0.x, R0, R0;
DP3R  R0.y, R1, R1;
RSQR  R0.y, R0.y;
RSQR  R0.x, R0.x;
MULR  R0.x, R0, R1;
MULR  R1.y, R0, R1;
MULR  R1.x, R0, {0,5, 0, 0, 0};
MOVR  R0.xy, R1;
ADDR  R0.zw, R1.xyxy, {1, 0, 0, 0}.x;
SGERC HC.x, f[TEX1].z, R2.z;
MULR  R0.xy(GT.x), R0.zwzw, {0,5, 0, 0, 0}.x;
MOVR  R1.x, R0;
MADR  R1.x(EQ), -R0, {0,5, 1, 0, 0}, {0,5, 1, 0, 0}.y;
MOVR  R0.x, R0.y;
ADDR  R0.y, R1, {1, 0, 0, 0}.x;
MULR  R0.x(EQ), R0.y, {0,5, 0, 0, 0};
MOVR  R1.y, R0.x;
TEX   R0, R1, TEX0, 2D;
DP3R  R0.w, f[TEX0], f[TEX0];
RSQR  R1.x, R0.w;
DP3R  R0.w, f[TEX1], f[TEX1];
RSQR  R0.w, R0.w;
MULR  R1.xyz, R1.x, f[TEX0];
MADR  R1.xyz, R0.w, f[TEX1], -R1;
RCPR  R1.z, -R1.z;
MULR  R1.z, R1, Depth.x;
MULR  R1.zw, R1.xyyx, R1.z;
RCPR  R2.x, f[TEX2].w;
MULR  R1.xy, f[TEX2], R2.x;
ADDR  R1.xy, R1.yxzw, R1.zwzw;
MADR  R1.xy, R1, {0,5, 0, 0, 0}.x, {0,5, 0, 0, 0}.x;
MINR_SAT R1.xy, R1, {0,9995117, 0, 0, 0}.x;
MULR  R1.z, R1.y, FrameWidth.x;
MULR  R1.y, R1.x, FrameHeight.x;
MULR  R1.x, R1.z, {0,0004882812, 0, 0, 0};
MULR  R1.y, R1, {0,0004882812, 0, 0, 0}.x;
TEX   R1, R1, TEX1, 2D;
ADDR  R2.xyz, R1, -R0;
MULR  R1.xyz, R0.w, f[TEX1];
DP3R  R0.w, R1, f[TEX0];
MULR  R0.w, |R0|, MixRatio.x;
MINR  R0.w, R0, {0,9, 0, 0, 0}.x;
MAXR  R0.w, R0, {0,1, 0, 0, 0}.x;
MADR  R0.xyz, R0.w, R2, R0;
MADR  R1.xyz, f[TEX3].x, BaseColor, -R0;
MADR  o[COLR].xyz, R1, {0,2, 0, 0, 0}.x, R0;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 54 instructions, 3 R-regs, 0 H-regs
--------
Shader: HeatHaze

Looks: that same sphere of static particles which are randomly colored

Code:
Compiling '../shaders/default/HeatHaze.vert'...

Compiling '../shaders/default/HeatHaze.frag'...

Linking '../shaders/default/HeatHaze.vert' with '../shaders/default/HeatHaze.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1004:
-- error message --
line 38, column 27:  error: expected '}'
line 39, column 36:  error: expected '}'
line 44, column 28:  error: expected '}'
line 46, column 27:  error: expected '}'
line 47, column 36:  error: expected '}'
line 49, column 36:  error: expected '}'
line 50, column 36:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic FrameWidth
#semantic FrameHeight
#semantic Frequency
#semantic Offset
#semantic Fade
#semantic Speed
#semantic FrameBuffer
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float FrameWidth :  :  : -1 : 1
#var float FrameHeight :  :  : -1 : 1
#var float Frequency :  :  : -1 : 1
#var float Offset :  :  : -1 : 1
#var float Fade :  :  : -1 : 1
#var int Speed :  :  : -1 : 1
#var sampler2D FrameBuffer :  : texunit 0 : -1 : 1
#var float4 EyePos : $vin.TEX0 : TEX0 : -1 : 1
DECLARE Fade;
DECLARE Frequency;
DECLARE Offset;
DECLARE Speed;
DECLARE FrameWidth;
DECLARE FrameHeight;
MOVR  R0.w, Offset.x;
RCPR  R0.x, f[TEX0].w;
MULR  R0.xy, f[TEX0], R0.x;
ADDR  R0.z, R0.y, Fade.x;
MULR  R1.x, Speed, R0.w;
MULR  R0.w, Frequency.x, R0.y;
MADR  R0.w, R0, {5, 0, 0, 0}.x, R1.x;
ADDR  R0.z, -R0, {1, 0, 0, 0}.x;
MADR  R0.x, R0, {0,5, 0, 0, 0}, {0,5, 0, 0, 0};
MINR_SAT R0.x, R0, {0,9995117, 0, 0, 0};
MULR  R0.x, R0, FrameWidth;
SINR  R0.w, R0.w;
MAXR  R0.z, R0, {0, 0, 0, 0}.x;
MULR  R0.z, R0, R0.w;
MULR  R0.z, R0, {0,06, 0, 0, 0}.x;
ADDR  R0.y, R0, R0.z;
MADR  R0.y, R0, {0,5, 0, 0, 0}.x, {0,5, 0, 0, 0}.x;
MINR_SAT R0.y, R0, {0,9995117, 0, 0, 0}.x;
MULR  R0.y, R0, FrameHeight.x;
MULR  R0.x, R0, {0,0004882812, 0, 0, 0};
MULR  R0.y, R0, {0,0004882812, 0, 0, 0}.x;
TEX   o[COLR].xyz, R0, TEX0, 2D;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 23 instructions, 2 R-regs, 0 H-regs
--------
Shader: BloobyCloud

Looks: some huge static (even ignoring the mouse dragging) unshaded sphere with a photo mapped on it

Code:
Compiling '../shaders/default/BlobbyCloud.vert'...

Compiling '../shaders/default/BlobbyCloud.frag'...

Linking '../shaders/default/BlobbyCloud.vert' with '../shaders/default/BlobbyCloud.frag'...
Validating...
Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-07-05, 06:42 PM   #5
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Shader: Bubbles

Looks: a much smaller version of the sphere from the last shader, but this time smooth-shaded and moving with the podium

Code:
Compiling '../shaders/default/Bubbles.vert'...

Compiling '../shaders/default/Bubbles.frag'...

Linking '../shaders/default/Bubbles.vert' with '../shaders/default/Bubbles.frag'...
Failed link.
Fragment info
-------------
Internal error: assembly compile error for fragment shader at offset 1283:
-- error message --
line 45, column 27:  error: expected '}'
line 49, column 39:  error: expected '}'
line 51, column 32:  error: expected '}'
line 54, column 33:  error: expected '}'
line 61, column 31:  error: expected '}'
line 62, column 29:  error: expected '}'
line 66, column 33:  error: expected '}'
line 67, column 37:  error: expected '}'
line 70, column 38:  error: expected '}'
line 71, column 38:  error: expected '}'
line 79, column 27:  error: expected '}'
line 80, column 27:  error: expected '}'
line 84, column 34:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic BaseColor
#semantic MixRatio
#semantic EnvMap
#semantic RefractionMap
#semantic RainbowMap
#semantic FrameWidth
#semantic FrameHeight
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float3 BaseColor :  :  : -1 : 1
#var float MixRatio :  :  : -1 : 1
#var sampler2D EnvMap :  : texunit 0 : -1 : 1
#var sampler2D RefractionMap :  : texunit 2 : -1 : 1
#var sampler2D RainbowMap :  : texunit 1 : -1 : 1
#var float FrameWidth :  :  : -1 : 1
#var float FrameHeight :  :  : -1 : 1
#var float3 Normal : $vin.TEX0 : TEX0 : -1 : 1
#var float3 EyeDir : $vin.TEX1 : TEX1 : -1 : 1
#var float4 EyePos : $vin.TEX2 : TEX2 : -1 : 1
#var float LightIntensity : $vin.TEX3 : TEX3 : -1 : 1
#var float Radius :  :  : -1 : 0
DECLARE MixRatio;
DECLARE FrameWidth;
DECLARE FrameHeight;
DECLARE BaseColor;
MOVR  R0.xyz, f[TEX1];
DP3R  R0.x, f[TEX0], R0;
MULR  R0.xyz, f[TEX0], R0.x;
MULR  R2.xyz, R0, {2, 0, 0, 0}.x;
ADDR  R1.xyz, f[TEX1], -R2;
MOVR  R0.xz, R1;
MOVR  R0.y, {0, 0, 0, 0}.x;
DP3R  R0.x, R0, R0;
DP3R  R0.y, R1, R1;
RSQR  R0.y, R0.y;
RSQR  R0.x, R0.x;
MULR  R0.x, R0, R1;
MULR  R1.y, R0, R1;
MULR  R1.x, R0, {0,5, 0, 0, 0};
MOVR  R0.xy, R1;
ADDR  R0.zw, R1.xyxy, {1, 0, 0, 0}.x;
SGERC HC.x, f[TEX1].z, R2.z;
MULR  R0.xy(GT.x), R0.zwzw, {0,5, 0, 0, 0}.x;
MOVR  R1.x, R0;
MADR  R1.x(EQ), -R0, {0,5, 1, 0, 0}, {0,5, 1, 0, 0}.y;
MOVR  R0.x, R0.y;
ADDR  R0.y, R1, {1, 0, 0, 0}.x;
MULR  R0.x(EQ), R0.y, {0,5, 0, 0, 0};
MOVR  R1.y, R0.x;
SINR  R0.x, f[TEX1].x;
SINR  R0.y, f[TEX1].y;
ADDR  R0.xy, R0, R1;
TEX   R0, R0, TEX1, 2D;
TEX   R1, R1, TEX0, 2D;
DP3R  R0.w, R1, {0,425, 1,4308, 0,1442, 0};
ADDR  R0.xyz, R0, {0,6, 0, 0, 0}.x;
MULR  R0.xyz, R0, R0.w;
RCPR  R0.w, f[TEX2].w;
MULR  R1.xy, f[TEX2], R0.w;
MADR  R1.xy, R1.yxzw, {0,5, 0, 0, 0}.x, {0,5, 0, 0, 0}.x;
MINR_SAT R1.xy, R1, {0,9995117, 0, 0, 0}.x;
MULR  R0.w, R1.x, FrameHeight.x;
MULR  R1.y, R1, FrameWidth.x;
MULR  R1.x, R1.y, {0,0004882812, 0, 0, 0};
MULR  R1.y, R0.w, {0,0004882812, 0, 0, 0}.x;
TEX   R1, R1, TEX2, 2D;
DP3R  R0.w, f[TEX1], f[TEX1];
ADDR  R2.xyz, R1, -R0;
RSQR  R0.w, R0.w;
MULR  R1.xyz, R0.w, f[TEX1];
DP3R  R0.w, R1, f[TEX0];
MULR  R0.w, |R0|, MixRatio.x;
MINR  R0.w, R0, {0,9, 0, 0, 0}.x;
MAXR  R0.w, R0, {0,5, 0, 0, 0}.x;
MULR  R1.xyz, R0.w, R2;
ADDR  R0.xyz, R0, R1;
MADR  R1.xyz, f[TEX3].x, BaseColor, -R0;
MADR  o[COLR].xyz, R1, {0,2, 0, 0, 0}.x, R0;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 54 instructions, 3 R-regs, 0 H-regs
Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-09-05, 11:50 PM   #6
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Hm... I'm the only one posting to this thread... at least some seem to have taken a look at it. Whatever... I just want to take back a bit of my ranting from the second post about the lack of developer-tools from nvidia for Linux. As I just learned from watching some videos of their SIGGRAPH 2005 presentations, they are about to bring at least NVPerfKit (and I think NVShaderPerf also) to Linux too. Still "FX-Composer" and "SDK-Browser" would be even better to have available on Linux.

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-11-05, 04:19 PM   #7
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Oh my ****ing god... GLSLdemo-3.6 fully works under Linux (minus the shaders my GPU lacks the loop-support for)! I figured out that the problem was the locale (env. variable $LANG) which is set to the value de_DE.UTF-8 on my german Fedora Core 4 box. A "side-effect" of this fact is float values printf'ed out use a decimal , (comma) and not a decimal . (point) Since a , (comma) is usually used as the parameter-list seperator-character, the built-in parser of the driver was expecting a closing } (curly brace) far to early and thus reported all those syntax-errors for the linking-stage. When you look at the the error-messages I posted in the earlier posts you see float-elements of vectors using the , instead of a . I didn't see it right away, because at 1600x1200 the non-freetype fonts of the wxWindows-based UI of GLSLdemo-3.6 are hard to read.

So, the driver-developers at nvidia would need to make the shader-compiler in the driver locale-aware or at least switch internally to an english locale.

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-12-05, 09:11 AM   #8
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

A quick work-around for everybody suffering from the same locale-bug currently in the nvidia-driver... start an app like this:

Code:
LC_NUMERIC=C ./some-glsl-app
You're free to make that permanent by adding:

Code:
export LC_NUMERIC=C
to your ~/.bashrc or similar files dealing with your env-var settings. But that's just a short-term fix and by no means elegant. Actually all some nvidia-driver developer has to do is to add:

Code:
setlocale (LC_NUMERIC, "C");
at the right spot in the compiler-code of the driver. What?! Who said "Open source the driver there!"... sorry, couldn't resist

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote

Old 09-12-05, 09:57 AM   #9
aritger
NVIDIA Corporation
 
aritger's Avatar
 
Join Date: Oct 2002
Posts: 53
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Hi MacSlow,

The GLSL spec defines floating points with "." as decimal point. It is the responsibility of the application generating the GLSL code to output the GLSL code in the proper format.

The GLSL parser in the NVIDIA driver should not be locale-aware.

Thanks.
__________________
Andy Ritger
NVIDIA Linux Graphics Driver Engineer
aritger is offline   Reply With Quote
Old 09-12-05, 11:58 AM   #10
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Quote:
Originally Posted by aritger
The GLSL spec defines floating points with "." as decimal point. It is the responsibility of the application generating the GLSL code to output the GLSL code in the proper format.

The GLSL parser in the NVIDIA driver should not be locale-aware.
Ok, understood.

I think I have to clarify a few things, because I assume you didn't read all of my previous posts (a bit much I admit , thus are lacking a full view of the picture. In addition to that, I also provide more detailed observations regarding this error.

The program in question - GLSLdemo-3.6 from 3Dlabs - does nothing more than feed GLSL-compliant sourcecode (read from textfiles stored on the harddisk) to glCompileShader(). Furthermore it provides a view of the resulting infolog-dump obtained via glGetShaderInfoLog() after the call to glCompileShader(). Because it does not process the shader-source textfile in any way, it is therefore not responsible for the injection of the error in my opinion. It does read the textfile itself as one large chunk of text via the usual C library file-I/O functions, which don't introduce any locale-triggered character-conversions as far as I know. The compilation-results from glCompileShader(), which have to be done by some part of the GL-implementation from nvidia (my guess: Cg compiler built into the driver), then yield the the errors resulting from the german decimal-,. So, the entity reponsible for generating any code (in this particular case nv-shader assembly, in which the errors are reported) has to be some part of the nvidia-driver.

Here's one such reported error (reported lines highlighted in red, lines that are not reported but still look fishy to me highlighted in orange):
Code:
-------------
Internal error: assembly compile error for fragment shader at offset 932:
-- error message --
line 29, column 34:  error: expected '}'
line 33, column 32:  error: expected '}'
-- internal assembly text --
!!FP1.0
# cgc version 1.3.0001, build date Jul 29 2005 13:26:34
# command line args: 
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic EarthDay
#semantic EarthNight
#semantic EarthCloudGloss
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var sampler2D EarthDay :  : texunit 1 : -1 : 1
#var sampler2D EarthNight :  : texunit 2 : -1 : 1
#var sampler2D EarthCloudGloss :  : texunit 0 : -1 : 1
#var float Diffuse : $vin.TEX0 : TEX0 : -1 : 1
#var float3 Specular : $vin.TEX1 : TEX1 : -1 : 1
#var float2 TexCoord : $vin.TEX2 : TEX2 : -1 : 1
TEX   R2, f[TEX2], TEX0, 2D;
ADDR  R1.w, -R2.x, {1, 0, 0, 0}.x;
MULR  R1.xyz, f[TEX1], R2.y;
TEX   R0, f[TEX2], TEX1, 2D;
MADR  R1.xyz, R0, f[TEX0].x, R1;
TEX   R0, f[TEX2], TEX2, 2D;
MULR  R0.w, R2.x, f[TEX0].x;
MADR  R1.xyz, R1, R1.w, R0.w;
MULR  R0.xyz, R0, R1.w;
MULR  R0.xyz, R0, {2, 0, 0, 0}.x;
ADDR  R2.xyz, R1, -R0;
ADDR  R0.w, f[TEX0].x, {0,1, 0, 0, 0}.x;
MULR  R2.xyz, R0.w, R2;
MULR  R2.xyz, R2, {5, 0, 0, 0}.x;
MOVR  o[COLR].xyz, R1;
SLERC HC.x, f[TEX0], {0,1, 0, 0, 0};
ADDR  o[COLR].xyz(GT.x), R0, R2;
MOVR  o[COLR].w, {1, 0, 0, 0}.x;
END
# 18 instructions, 3 R-regs, 0 H-regs
Here is the same fragment-program ran through the command-line version of cgc 1.4.0 (with a locale env-var LANG=de_DE.UTF-8), which I have installed on my machine too. I used this command:

Code:
cgc -oglsl -profile fp30 Earth.frag
This produced this output (lines in to compare with previous output highlighted in green):

Code:
Earth.frag
35 lines, 0 errors.
!!FP1.0
# cgc version 1.4.0000, build date Jun  9 2005 12:24:47
# command line args: -oglsl -profile fp30
# source file: Earth.frag
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic EarthDay
#semantic EarthNight
#semantic EarthCloudGloss
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var sampler2D EarthDay :  : texunit 1 : -1 : 1
#var sampler2D EarthNight :  : texunit 2 : -1 : 1
#var sampler2D EarthCloudGloss :  : texunit 0 : -1 : 1
#var float Diffuse : $vin.TEX0 : TEX0 : -1 : 1
#var float3 Specular : $vin.TEX1 : TEX1 : -1 : 1
#var float2 TexCoord : $vin.TEX2 : TEX2 : -1 : 1
TEX   R2, f[TEX2], TEX0, 2D;
ADDR  R1.w, -R2.x, {1}.x;
MULR  R1.xyz, f[TEX1], R2.y;
TEX   R0, f[TEX2], TEX1, 2D;
MADR  R1.xyz, R0, f[TEX0].x, R1;
TEX   R0, f[TEX2], TEX2, 2D;
MULR  R0.w, R2.x, f[TEX0].x;
MADR  R1.xyz, R1, R1.w, R0.w;
MULR  R0.xyz, R0, R1.w;
MULR  R0.xyz, R0, {2}.x;
ADDR  R2.xyz, R1, -R0;
ADDR  R0.w, f[TEX0].x, {0.1}.x;
MULR  R2.xyz, R0.w, R2;
MULR  R2.xyz, R2, {5}.x;
MOVR  o[COLR].xyz, R1;
SLERC HC.x, f[TEX0], {0.1};
ADDR  o[COLR].xyz(GT.x), R0, R2;
MOVR  o[COLR].w, {1}.x;
END
# 18 instructions, 3 R-regs, 0 H-regs
As you can see no locale-inflicted errors here. So my conclusion is, that the version 1.3.0001 of cgc built into driver 1.0-7676 is indeed not locale-aware. I hope we'll see a fix for this soon In the meantime I can live with LC_NUMERIC=C in my ~/.bashrc.

Thanks in advance for your time and kind advice!

Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Old 09-12-05, 03:38 PM   #11
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

MacSlow,
We've opened bug 188562 to address this issue.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 09-12-05, 10:48 PM   #12
MacSlow
Registered User
 
MacSlow's Avatar
 
Join Date: Jul 2002
Location: Aachen, Germany
Posts: 76
Send a message via ICQ to MacSlow Send a message via AIM to MacSlow Send a message via MSN to MacSlow
Default Re: help needed for solving internal shader-compiler-errors from GLSL-usage

Quote:
Originally Posted by netllama
MacSlow,
We've opened bug 188562 to address this issue.

Thanks,
Lonni
Alright.

BTW, here's the fragment-program "Earth.frag" I used in the last example to expose the error (just in case you want to add that to your internal bug-report too for reference):

Code:
//
// Fragment shader for drawing the earth with multiple textures
//
// Author: Randi Rost
//
// Copyright (c) 2002-2005 3Dlabs Inc. Ltd.
//

uniform sampler2D EarthDay;
uniform sampler2D EarthNight;
uniform sampler2D EarthCloudGloss;

varying float Diffuse;
varying vec3  Specular;
varying vec2  TexCoord;

void main (void)
{
    // Monochrome cloud cover value will be in clouds.r
    // Gloss value will be in clouds.g
    // clouds.b will be unused

    vec2 clouds    = texture2D(EarthCloudGloss, TexCoord).rg;
    vec3 daytime   = (texture2D(EarthDay, TexCoord).rgb * Diffuse +
                          Specular * clouds.g) * (1.0 - clouds.r) +
                          clouds.r * Diffuse;
    vec3 nighttime = texture2D(EarthNight, TexCoord).rgb *
                         (1.0 - clouds.r) * 2.0;

    vec3 color = daytime;

    if (Diffuse <= 0.1)
        color = mix(nighttime, daytime, (Diffuse + 0.1) * 5.0);

    gl_FragColor = vec4 (color, 1.0);
}
Best regards...

MacSlow
__________________
First they ignore you...
then they laugh at you...
then they fight you...
then you win!
(Gandhi)
MacSlow is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:58 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.