The Complete Bug List of ARB_vertex_program on MacOS X

This week end, I still found some bugs in the ‘Software’ or ‘Hardware’ ARB_vertex_program implementation.

I’ve searched a bit the mailing list and here what I found:

Thoses bugs might be fixed by now, but if someone can have a more complete list.

My idea is to write a function that get an known valid ARB vertex program and ‘patches’ it in order to make the shader works.

For example, if it find an ‘ARB_position_invariant’, replaces by 4 DP4, if it find an MAD, replaces by a MUL + ADD on Geforce4, etc…

Actually even in 10.3.6, I’ve got some situation like when I uses vertex program, geometry is rendered everywhere. I’m pretty sure it came from the vertex program because slightly modify it, ‘fixes’ it.

Without trolling, I understand why GLSL is not yet out, even they are not still able to make the ARB_vertex_program works correctly.

Here a small list, if anyone can post more information, in order to have in this thread the complete list of known bugs of ARB_vertex_program on MacOS X.

First, ARB_vertex_program on a Radeon 9000 is broken beyond belief. A simple pass-through type shader (below) produced geometry everywhere. I gave up with this hardware pretty quickly.

OPTION ARB_position_invariant;
MOV result.color, vertex.color;

(bug ID 3092875)

Second, the MAD instruction on the GeForce4Ti is broken. Replacing it with a MUL and an ADD works fine, as long as you don’t need the extra instruction space for anything.

(bug ID 3093026)

Third, on a GeForce4Ti, certain vertex programs are capable of changing internal state such that subsequent programs do not behave correctly, or as they would in isolation. I’ve had much less success putting my finger on precisely what’s going on here, but it appears that accessing certain pieces of OpenGL state can cause this. The program causing the problem does not always show incorrect behavior.

(bug ID 3093442)

I can confirm all three of those are fixed in 10.3.6 (in fact, I think they were fixed in 10.2.5).

bug 3640387 (ARB_vertex_program broken on ATI)
Certain ARB_vertex_programs do not produce the expected results on ATI hardware, yet work with the software renderer.

It seems to be related to using vertex.normal in some way. I can sometimes work around the problem by putting vertex.normal into a named ATTRIB, or by not putting it into a named ATTRIB

  • this seems fixed (again; was an issue in about 10.2.4 and re-broken around 10.3.2) in 10.3.6.

That’s the only bug I’ve submitted in recent memory (but I haven’t done much ARB_vp’ing recently either). I have this non-working program outstanding. Precisely what happens is very dependent on the renderer, but they all (bar software) agree something’s wrong. Can anyone see it?


PARAM sineCoefficients = { 1.0, -0.166666666666667, 0.00833333333333333, -0.000198412698412698 };
PARAM cosineCoefficients = { 1.0, -0.5, 0.0416666666666667, -0.00138888888888889 };

PARAM angle = program.local[0];
PARAM VORTEX_RADIUS = { 128.0, 128.0, 128.0, 128.0 };
PARAM VORTEX_CENTER = { 320.0, 176.0 };
PARAM TEX_SCALE = { 0.0009765625, 0.001953125 };

TEMP dist;
MOV dist, vertex.position.zzzz;

TEMP position;
SWZ position, vertex.position, x, y, 0, 1;

ADD x, angle, vertex.position.wwww;

PARAM piVec = { 0.159154943, 6.283185307, 3.141592654, 0 };

ADD y, x, piVec.z;
MUL y, x, piVec.x;
EXP y, y.x;
MUL y, y.y, piVec.y;
SUB y, y, piVec.z;

PARAM power0 = { 1.0, 1.0, 1.0, 1.0 };

TEMP power1, power2;
MOV power1, y.xxxx;
MUL power2, power1, power1;

TEMP evenPowers;
MOV evenPowers, power0;
MUL evenPowers.yzw, evenPowers, power2;
MUL, evenPowers, power2;
MUL evenPowers.w, evenPowers, power2;

TEMP oddPowers;
MOV oddPowers, power1;
MUL oddPowers.yzw, oddPowers, power2;
MUL, oddPowers, power2;
MUL oddPowers.w, oddPowers, power2;

TEMP angle_offset;
DP4 angle_offset.x, evenPowers, cosineCoefficients;
DP4 angle_offset.y, oddPowers, sineCoefficients;

TEMP newtex;
MAD newtex, dist, angle_offset, VORTEX_CENTER;
MUL newtex, newtex, TEX_SCALE;

TEMP choose;
SLT choose, dist, VORTEX_RADIUS;

TEMP tex;
MUL tex, newtex, choose;
SUB choose, { 1, 1, 1, 1 }, choose;
MAD result.texcoord.xy, choose, vertex.texcoord, tex;
MOV, { 0, 0, 0, 1 };

DP4 result.position.x, state.matrix.mvp.row[0], position;
DP4 result.position.y, state.matrix.mvp.row[1], position;
DP4 result.position.z, state.matrix.mvp.row[2], position;
DP4 result.position.w, state.matrix.mvp.row[3], position;

MOV result.color, { 1, 1, 1, 1 };


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