Im probably missing something blatantly obvious, but given compUVIndex and prevUVIndex are both vec4, shouldnt the following two fragments of code return the same result?
I have the ATI 4870x2, with the latest catalyst drivers, on windows XP 64-bit. Im guessing my opengl version would be 3.0 or above but I thought the GPU driver took care of that? Any I will update my drivers once again, just in case.
I have ATI Radeon 2400HD with Catalyst 9.10.
Made some experiments on your case.
The problem is: vec2 == vec2 is not a boolean expression in theory (GLSL spec).
It should be of ‘bvec2’ that is not accepted in ‘if’ statement.
In order to pass it to ‘if’ you need to cover it with either ‘all’ or ‘any’ function.
However, the driver doesn’t complain about ‘vec2==vec2’ passed to ‘if’.
Experimentally I discovered that it works like: any( equal(vec2,vec2) )
The equality operators equal (==), and not equal (!=) operate on all types. They result in a scalar
Boolean. If the operand types do not match, then there must be a conversion from Section 4.1.10
“Implicit Conversions” applied to one operand that can make them match, in which case this
conversion is done. For vectors, matrices, structures, and arrays, all components, fields, or elements of
one operand must equal the corresponding components, fields, or elements in the other operand for the
operands to be considered equal. To get a vector of component-wise equality results for vectors, use
the built-in functions equal and notEqual.
This actually says, that vec2==vec2 should indeed work and returns true, if all pairs of components (x0/x1; y0/y1) are equal. So it seems, the OP tripped on a driver bug.