I encountered this error message while writing an ARB_vertex_program with NV_vertex_program2 option enabled. The relevant portion are as follows:
1. Initialize the parameter array
PARAM c[255] = {{0.9, 0.9, 0.9, 1.0}, {1.0, 0.0, 0.0, 0.0}, program.env[2..239], {1.0, 0.0, 0.0, 0.0}, {1.0, 0.0, 0.0, 0.0}, program.env[242..254]};
2. Set up an address register for relative addressing
ADDRESS A0;
...
ARR A0.x, c[1].x;
3. Perform relative addressing on the c[] array
...
MOV result.color.front.primary, c[A0.x];
END
I am aware that there are duplicates in the array, and that this is the reason why I get the error message. However, given that relative addressing is performed on the array, the duplicates should not be compacted. Is this a bug? Or am I doing something wrong? The error does go away when I change the duplicates to arbitrary values.
Thanks!
ARB_vertex_program error: Binding in multiple relative-addressedarrays
Started by ads, Mar 20 2006 11:52 PM
2 replies to this topic
#1
Posted 20 March 2006 - 11:52 PM
#2
Posted 21 March 2006 - 01:54 AM
I think that the problem is you use program.env twice. The spec for ARB_vertex_program says: "A vertex program will fail to load if any GL state vector is bound multiple times in a single array accessed using relative addressing or bound once in two or more arrays accessed using relative addressing." I guess you'll have to find another way to accomplish whatever it is you're trying to do...maybe storing those data in a 1D texture instead?
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 21 March 2006 - 08:20 PM
The multiple binding makes sense now. Oddly though if you remove the duplicates and substitute them with some other values it works. This must be some oddity in the driver or the spec. Anyways, I was curious about the error message as I didn't get any google results.
Thanks!
Thanks!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











