2 Replies Latest reply on Apr 19, 2008 11:34 PM by Kevin Goldsmith

    Strange bug with vector/function on Geforce 7300 GT

    zazzo9
      This bug was in preview 1 as well. It's quite difficult to wrap one's mind around when part of a large filter. I found this problem running code on the GPU in Mac OS X.

      The return value of the two-parameter atan function, when assigned to a vector index greater than 0, always yields 0.0 unless it is part of an expression. Multiplying the result by 1.0, or adding 0.0 to it, gives the correct non-zero result -- and storing the value in the first field of the vector rather than 'y' or 'z' also fixes the problem.

      The one-parameter form of atan exhibits a similar bug -- when stored in a nonzero index and not part of an expression, the function incorrectly returns a different curve from atan(y, 1.); but if stored in the 'x' coordinate or as part of an expression, it correctly returns the same curve.

      In the code attached, bugged_vector.y is apparently always equal to zero. not_bugged_vector.y is set to the same value as bugged_vector.y, but yields (correctly) a range of values. The resulting image should have a red vertical gradient from bugged_vector, and a green horizontal gradient from not_bugged_vector, but only the green gradient is visible.

      EDIT:
      Trying this on other computers shows it only happens on this exact system. It has an NVIDIA GeForce 7300 GT. I could find no driver updates for this card on OS X at nvidia.com.