OSDN Git Service

gallivm: Use a minimax polynomial for exp2 in range [0,1] instead [-0.5,5].
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 8 May 2010 20:42:55 +0000 (21:42 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 8 May 2010 22:29:05 +0000 (23:29 +0100)
commitc376dadbb07eccf18801b9983be15f6329335d1e
treeb062190437c9f1eb40d83f7f27c4c168a9ff6fec
parentde088c6ae44f78d0afa3970cbaf40cdfc21d8fd9
gallivm: Use a minimax polynomial for exp2 in range [0,1] instead [-0.5,5].

The advantage of range[-0.5, 0.5] is that it doesn't require floor (for
which intrinsics are only available in SSE4.1).

But the EXP opcode pretty much forces us to use floor, and there is a
good floor approximation around truncation available anyway.

This fixes EXP failures in VShader DCT.
src/gallium/auxiliary/gallivm/lp_bld_arit.c