glsl problem
Rhadamés Carmona <[email protected]> Thu, 16 Aug 2007 20:35:24 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Hello Guys
When my GLSL fragment program is translated to assembler instructions, some
errors appear in the assembly code. If I comment any random code in my
program, errors disapear.
The line 109 uses a rare variable (vr6). It is the first error. But I do not
have control over that code,...it is generated by the compiler.
I have latest glew, and latest OpenGL drivers for my nvidia Go 7900 gs. I do
not know what to do... it looks like the GLSL compiler is generating
unsupported code.
I would appreciate any help
RIX
Internal error: assembly compile error for fragment shader at offset 3245:
-- error message --
line 109, column 10: error: invalid destination variable
line 111, column 7: error: invalid destination variable
line 116, column 7: error: invalid destination variable
line 117, column 7: error: invalid destination variable
line 118, column 7: error: invalid destination variable
line 119, column 7: error: invalid destination variable
line 120, column 7: error: invalid destination variable
line 122, column 15: error: invalid operand variable
line 123, column 15: error: invalid operand variable
line 124, column 15: error: invalid operand variable
line 125, column 37: error: invalid operand variable
line 130, column 15: error: invalid operand variable
line 165, column 13: error: invalid operand variable
line 173, column 15: error: invalid operand variable
line 175, column 13: error: invalid operand variable
line 177, column 7: error: invalid destination variable
line 178, column 7: error: invalid destination variable
line 179, column 7: error: invalid destination variable
line 180, column 7: error: invalid destination variable
line 181, column 7: error: invalid destination variable
line 183, column 15: error: invalid operand variable
line 188, column 13: error: invalid operand variable
line 206, column 13: error: invalid operand variable
line 208, column 13: error: invalid operand variable
line 210, column 13: error: invalid operand variable
line 215, column 13: error: invalid operand variable
-- internal assembly text --
!!ARBfp1.0
OPTION NV_fragment_program2;
# cgc version 1.5.0000, build date Mar 21 2006 20:26:38
# command line args:
#vendor NVIDIA Corporation
#version 1.0.02
#profile fp40
#program main
#semantic gl_TextureMatrixInverse
#semantic volume
#semantic texToWorld
#semantic integrals
#semantic half_pixel_size
#semantic plane
#semantic top
#semantic maxHp2
#var float4 gl_TexCoord[0] : $vin.TEX0 : TEX0 : -1 : 1
#var float4 gl_TexCoord[1] : $vin.TEX1 : TEX1 : -1 : 1
#var float4 gl_TexCoord[2] : $vin.TEX2 : TEX2 : -1 : 1
#var float4 gl_TexCoord[3] : $vin.TEX3 : TEX3 : -1 : 1
#var float4 gl_TexCoord[4] : $vin.TEX4 : TEX4 : -1 : 1
#var float4 gl_TexCoord[5] : $vin.TEX5 : TEX5 : -1 : 1
#var float4 gl_TexCoord[6] : : : -1 : 0
#var float4 gl_TexCoord[7] : : : -1 : 0
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
#var float4x4 gl_TextureMatrixInverse[0] : : c[0], 4 : -1 : 1
#var float4x4 gl_TextureMatrixInverse[1] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[2] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[3] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[4] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[5] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[6] : : , 4 : -1 : 0
#var float4x4 gl_TextureMatrixInverse[7] : : , 4 : -1 : 0
#var sampler3D volume : : texunit 0 : -1 : 1
#var float texToWorld : : c[9] : -1 : 1
#var sampler3D integrals : : texunit 1 : -1 : 1
#var float3 half_pixel_size : : c[5] : -1 : 1
#var float4 plane : : c[4] : -1 : 1
#var float3 top : : c[7] : -1 : 1
#var float maxHp2 : : c[8] : -1 : 1
#var float interSampleDistance : $vin.TEX6 : TEX6 : -1 : 1
#var <none> $kill_0000 : $vout.$kill : $kill : -1 : 0
#const c[6] = 0 1 0.5 2
#const c[10] = 1.5
PARAM c[11] = { program.local[0..5],
{ 0, 1, 0.5, 2 },
program.local[7..9],
{ 1.5 } };
TEMP R0;
TEMP R1;
TEMP R2;
TEMP R3;
TEMP R4;
TEMP R5;
SHORT TEMP H0;
SHORT TEMP H1;
SHORT TEMP H2;
TEMP RC;
TEMP HC;
OUTPUT oCol = result.color;
SLTR H0.xyz, fragment.texcoord[2].zyxw, c[5].zyxw;
DP3R R0.x, fragment.texcoord[4], c[4];
RCPR R0.x, R0.x;
MULR R0.x, R0, -c[4].w;
MULR R1.xyz, fragment.texcoord[4], R0.x;
SLTR H0.w, fragment.texcoord[4].z, R1.z;
MULR R0.xyz, R1.y, c[1];
MADR R0.xyz, R1.x, c[0], R0;
MADR R2.xyz, R1.z, c[2], R0;
MOVR R0.xyz, fragment.texcoord[1];
MOVXC HC.x, H0.w;
ADDR R0.xyz(GT.x), R2, c[3];
ADDR R3.xyz, -R0, fragment.texcoord[2];
MOVR R1.w, c[6].y;
MOVXC HC.xyz, H0.zyxw;
ADDR R4.xyz, -R0, c[5];
RCPR R0.w, R3.x;
MULR R2.x, R0.w, R4;
MINR R1.w(GT.x), R2.x, c[6].y;
ADDR R2.xyz, -R0, c[7];
MULR R0.w, R2.x, R0;
RCPR R2.x, R3.y;
MULR R2.w, R4.y, R2.x;
MULR R2.x, R2.y, R2;
SEQX H2.xy, H0.yzzw, c[6].x;
SGTR H1.xyz, fragment.texcoord[2].zyxw, c[7].zyxw;
MULX H1.zw, H1.xyzy, H2.xyyx;
MOVXC HC.xy, H1.zwzw;
MINR R1.w(GT.x), R0, c[6].y;
MOVR R0.w, R1;
MOVXC HC.xyz, H0.zyxw;
MINR R0.w(GT.y), R1, R2;
MOVR R1.w, R0;
MOVXC HC.xy, H1.zwzw;
MINR R1.w(GT.y), R0, R2.x;
MOVXC HC.xyz, H0.zyxw;
RCPR R2.x, R3.z;
MULR R2.y, R4.z, R2.x;
MOVR R0.w, R1;
MINR R0.w(GT.z), R1, R2.y;
SEQX H0.x, H0, c[6];
MULX H0.x, H0, H1;
MOVR R1.w, R0;
MOVXC HC.x, H0;
MULR R2.x, R2.z, R2;
MINR R1.w(GT.x), R0, R2.x;
SNER H0.x, R1.w, c[6].y;
MOVXC HC.x, H0;
ADDX_SAT vr6.x, H0.w, H0;
SGER H0.x, fragment.texcoord[4].z, R1.z;
MADR vr8.xyz(GT.x), R1.w, R3, R0;
SGER H0.y, fragment.texcoord[5].z, R1.z;
MOVXC HC.x, H0.y;
KIL GT.x;
MOVXC HC.x, H0;
MOVR vr8.xyz, fragment.texcoord[2];
MOVR vr4.xyz, R0;
MOVR vr3.xyz, fragment.texcoord[0];
MOVX vr5.x, H0;
MOVR vr7.xyz, R1;
IF GT.x;
MULR R0.xyz, vr7.y, c[1];
MADR R0.xyz, vr7.x, c[0], R0;
MADR R1.xyz, vr7.z, c[2], R0;
SGTR H0.w, fragment.texcoord[3].z, vr7.z;
MOVR R0.xyz, fragment.texcoord[0];
MOVXC HC.x, H0.w;
ADDR R0.xyz(GT.x), R1, c[3];
SLTR H0.xyz, R0.zyxw, c[5].zyxw;
MOVR R1.xyz, vr4;
MOVR R2.xyz, R1;
ADDR R4.xyz, R0, -R2;
MOVR R1.w, c[6].y;
MOVXC HC.xyz, H0.zyxw;
ADDR R3.xyz, -R2, c[7];
ADDR R5.xyz, -R2, c[5];
RCPR R0.w, R4.x;
MULR R2.w, R0, R5.x;
MINR R1.w(GT.x), R2, c[6].y;
SEQX H1.xyz, H0, c[6].x;
SGTR H2.xyz, R0.zyxw, c[7].zyxw;
MULX H1.xyz, H1.zyxw, H2.zyxw;
MULR R0.w, R3.x, R0;
MOVXC HC.xyz, H1;
MINR R1.w(GT.x), R0, c[6].y;
RCPR R2.w, R4.y;
MULR R3.x, R5.y, R2.w;
MOVR R0.w, R1;
MOVXC HC.xyz, H0.zyxw;
MINR R0.w(GT.y), R1, R3.x;
MOVR R1.w, R0;
MULR R2.w, R3.y, R2;
MOVXC HC.xyz, H1;
MINR R1.w(GT.y), R0, R2;
MOVXC HC.xyz, H0.zyxw;
RCPR R3.x, R4.z;
MOVR R2.w, R1;
MULR R0.w, R5.z, R3.x;
MINR R2.w(GT.z), R1, R0;
MOVXC HC.xyz, H1;
MOVX H0.x, c[6];
MOVR R0.w, R2;
MULR R1.w, R3.z, R3.x;
MINR R0.w(GT.z), R2, R1;
MOVX H0.y, vr5.x;
MOVXC HC.x, H0.w;
MOVX H0.x(NE), H0.y;
SNER H0.y, R0.w, c[6];
MOVXC HC.x, H0.y;
MADR R0.xyz(GT.x), R0.w, R4, R2;
MOVX H0.x(GT), c[6].y;
MOVXC HC.x, H0;
ADDR R2.xyz, vr8, R0;
MOVX H0.y, c[6];
MOVX H0.z, vr6.x;
MOVH H0.y(LE.x), H0.z;
MOVR vr4.xyz, R1;
MULR vr4.xyz(GT.x), R2, c[6].z;
MOVR vr3.xyz, R0;
MOVX vr5.x, H0;
MOVX vr6.x, H0.y;
ENDIF;
ADDR R0.xyz, vr8, -vr4;
DP3R R0.x, R0, R0;
RSQR R0.x, R0.x;
RCPR R0.y, R0.x;
MOVR R0.x, fragment.texcoord[6];
MOVXC HC.x, vr6;
MULR R0.x(GT), R0.y, c[9];
LG2R R0.y, R0.x;
FLRR R0.y, R0;
POWR R0.z, c[6].w, R0.y;
SLER H0.x, R0, c[6].y;
RCPR R0.z, R0.z;
MADR R0.z, R0.x, R0, -c[6].y;
ADDR R0.z, R0.y, R0;
ADDR R0.y, R0.x, c[6].z;
MOVXC HC.x, H0;
ADDR R0.y(EQ.x), R0.z, c[10].x;
MOVR R0.x, c[6].z;
ADDR R0.x, -R0, c[8];
MINR R0.x, R0, R0.y;
MAXR R0.x, R0, c[6].z;
RCPR R0.y, c[8].x;
MULR R0.z, R0.x, R0.y;
TEX R1.x, vr8, texture[0], 3D;
MOVR R0.y, R1.x;
TEX R0.x, vr4, texture[0], 3D;
TEX R1, R0, texture[1], 3D;
TEX R2.x, vr3, texture[0], 3D;
MOVR R0.y, R2.x;
TEX R0, R0, texture[1], 3D;
MADR R2, -R0.w, R1, R1;
MOVR oCol, R1;
MOVXC HC.x, vr5;
ADDR oCol(GT.x), R0, R2;
END
# 156 instructions, 6 R-regs, 3 H-regs
--
Estoy usando la versión gratuita de SPAMfighter para usuarios privados.
Ha eliminado 7270 correos spam hasta la fecha.
Los usuarios de pago no tienen este mensaje en sus correos.
Obtenga SPAMfighter gratis aquí: http://www.spamfighter.com/les
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: =?iso-8859-1?Q?Rhadam=E9s_Carmona?=
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).