Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: ARB_vertex_program doesn't want to be compiled for Radeon

  1. #1
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    4

    ARB_vertex_program doesn't want to be compiled for Radeon

    Hi! I have problem, this shader perfectly works on GF2GTS, but i have error in 20th line for Radeon(9600):"syntax error on pas 873 -Error on line 33: malfarmed declaration (hint: ',')". May be somebody know, what happening?=)
    Code :
    !!ARBvp1.0ATTRIB iPos         = vertex.position;
    ATTRIB iColor		= vertex.color;
    PARAM  mvp[4]       = { state.matrix.mvp };
    PARAM  cam_pos      =  program.local[0];
    OUTPUT oPos         = result.position;
    OUTPUT oTex0		= result.texcoord;
    OUTPUT oTex1		= result.texcoord[1];
    OUTPUT oColor       = result.color;
    TEMP tmp
    DP4 oPos.x, mvp[0], iPos;
    DP4 oPos.y, mvp[1], iPos;
    DP4 oPos.z, mvp[2], iPos;
    DP4 oPos.w, mvp[3], iPos;
    MOV oTex0.xy,iPos;
    MUL oTex1.xy, iPos, 0.03125;
    SUB tmp,iPos,cam_pos;
    MOV tmp.z,0;
    DP3 tmp,tmp,tmp;#<<here error
    MAD oColor,tmp, -0.00102564,1.64103;END

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,042

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    Try

    MOV tmp.z, 0.0;

    one line above.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  3. #3
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    4

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    no, it didn't help me=(
    error is still in line
    DP3 tmp, tmp, tmp;

  4. #4
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    There is no ;

    TEMP tmp;<---

    but that should give error pointing to the next line, not 20th.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  5. #5
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    4

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    eh, I saw this, i made misprint, when copied this code.

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    I tested it myself with Cat 4.5 and it looks like a bug, but the problem is on line 21

    MAD oColor, tmp, -0.0010256, 1.64103;

    If you remove the '-', it compiles.

    Or

    PARAM thing={-0.00102564, -0.00102564, -0.00102564, -0.00102564};

    MAD oColor, tmp, thing, 1.64103;

    You should email them.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  7. #7
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    4

    Re: ARB_vertex_program doesn't want to be compiled for Radeon

    Thanks a lot! i almost have became crazy with this bug=)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •