draw,llvmpipe: use exponent manipulation instead of exp2 for polygon offset
authorRoland Scheidegger <sroland@vmware.com>
Mon, 11 Nov 2013 15:11:59 +0000 (15:11 +0000)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 12 Nov 2013 19:08:58 +0000 (19:08 +0000)
commit50f19e3a668b1b589bf00613d33c7c7c4e6a4954
tree935ead207e3501e91c31c1590f40a0d751de2dea
parent2d77e4f922a8c34541d8b187e171738006bd6f4d
draw,llvmpipe: use exponent manipulation instead of exp2 for polygon offset

Since we explicitly require a integer input we should avoid using exp2 math
(even if we were using optimized versions), which turns the exp2 into a int
sub (plus some casts).

v2: fix bogus uint (needs to be int) math spotted by Matthew, fix comments

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_offset.c
src/gallium/drivers/llvmpipe/lp_state_setup.c