On Fri, Jul 18, 2014 at 2:37 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Fri, Jul 18, 2014 at 5:27 PM, Matt Turner <matts...@gmail.com> wrote: >> For 0.0f, applying the f2i and abs out of order doesn't affect the >> result, but for -0.0f (0x80000000, -2147483648) instead of getting 0, >> you'd get abs(-2147483648) (which is likely -2147483648 itself!). > > Couldn't you have a situation where 0.0 or -0.0 are actually not in > normal form, and are, e.g. 0xff800000 or something (i.e. non-0 > exponent)? I was concerned about that situation.
That /may/ be possible? ARB_shader_precision says "Any denormalized value input into a shader or potentially generated by an operation in a shader can be flushed to 0." On i965, even applying the absolute value source modifier on a register with a denormal value flushes that source to zero before it's fed to the instruction. Maybe other hardware doesn't operate like this? _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev