Texture coord screwed up in a vertex program

I’m having troubles getting a very simple vp to work:

!!ARBvp1.0

ATTRIB pos = vertex.position;
ATTRIB tex = vertex.texcoord;
PARAM mat[4] = { state.matrix.mvp };

DP4 result.position.x, mat[0], pos;
DP4 result.position.y, mat[1], pos;
DP4 result.position.z, mat[2], pos;
DP4 result.position.w, mat[3], pos;

MOV result.texcoord, tex;

END

Texture mapping doesn’t get right (I’m using EXT_texture_rectangle). My texture turns black, except the few first pixels. Can there be a problem with the unnormalized texcoords required by EXT_texture_rectangle? Anything else I forgot?

Regards
-Lev

Are you specifying your texture coordinates in the [0,texturewidth]x[0,textureheight] range?

If so, it should work fine, it does for me at least.

Yes I do, if I turn off the VP (and use the fixed function transform) everything works. Also I checked that result.position gives me valid and correct values, it’s just the texture that is screwed up.

-Lev

If you are running a NVIDIA card, please send me an app that reproduces the problem, (preferably with source) and I’ll file a bug if I can reproduce it.

Otherwise, send the app to your video card vendor’s developer support people.

The problem does not occur with NVIDIA card (GF4), just tested it. So it looks like ATI driver bug. Anyone knows where should I send it?

Regards
-Lev

devrel@ati.com