NVidia: Bug with texture2DProj and shadow2DProj?

Maybe I’m doing something very stupid here - but I don’t think so…

All fragment shader with projective samplers or shadow map samplers cause errors on my GeForce Fx 5200 with NVidia 61.06 drivers on a SuSE 9.1 Laptop.

An example:
uniform sampler2D ShadowMap;

void main()
{
gl_FragColor= texture2DProj(ShadowMap, gl_TexCoord[0]);
}

yields:
internal error: assembly compile error for fragment shader at offset 868:
– error message –
line 19, column 31: error: invalid suffix on number
– internal assembly text –
!!FP1.0

cgc version 1.2.1001, build date Jun 23 2004 08:35:07

command line args: -q -profile fp30 -entry main -oglsl -D__GLSL_CG_DATA_TYPES -D__GLSL_CG_STDLIB -D__GLSL_SAMPLER_RECT

#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic ShadowMap
#var float4 gl_TexCoord[0] : $vin.TEX0 : TEX0 : -1 : 1
#var float4 gl_TexCoord[1] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[2] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[3] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[4] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[5] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[6] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[7] : $vin.<null atom> : : -1 : 0
#var float4 gl_FragColor : $vout.COL : COL : -1 : 1
#var sampler2D ShadowMap : : texunit 0 : -1 : 1
TXP o[COLR], f[TEX0], TEX0, 2DSHADOW;
END

1 instructions, 0 R-regs, 0 H-regs

free(): invalid pointer 0xbfffcec0!

It works if I explicitly say gl_TexCoord[0].xyz (though spec say it should work for vec4)

Similar errors occur if I try to use a shadow map:

uniform sampler2DShadow ShadowMap;

void main()
{
gl_FragColor = shadow2DProj(ShadowMap, gl_TexCoord[0]);
}

yields:
Internal error: assembly compile error for fragment shader at offset 866:
– error message –
line 19, column 31: error: invalid suffix on number
– internal assembly text –
!!FP1.0

cgc version 1.2.1001, build date Jun 23 2004 08:35:07

command line args: -q -profile fp30 -entry main -oglsl -D__GLSL_CG_DATA_TYPES -D__GLSL_CG_STDLIB -D__GLSL_SAMPLER_RECT

#vendor NVIDIA Corporation
#version 1.0.02
#profile fp30
#program main
#semantic ShadowMap
#var float4 gl_TexCoord[0] : $vin.TEX0 : TEX0 : -1 : 1
#var float4 gl_TexCoord[1] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[2] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[3] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[4] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[5] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[6] : $vin.<null atom> : : -1 : 0
#var float4 gl_TexCoord[7] : $vin.<null atom> : : -1 : 0
#var float4 gl_FragColor : $vout.COL : COL : -1 : 1
#var sampler ShadowMap : : texunit 0 : -1 : 1
TXP o[COLR], f[TEX0], TEX0, 2DSHADOW;
END

1 instructions, 0 R-regs, 0 H-regs

free(): invalid pointer 0xbfffcec0!

Any idea what’s going on?

Thanks,
Stefan

I can also confirm I got this in Windows using some early 61.xx have not tested it on any official drivers tho.

Both examples work for me on 61.76.

This problem should be fixed in the latest linux driver.

http://www.nvidia.com/object/linux_display_ia32_1.0-6111.html

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.