[Mesa-dev] [PATCH 2/3] lp_bld_arit: Fix lp_build_sgn.
Olivier Galibert
galibert at pobox.com
Wed May 9 21:39:35 PDT 2012
On Wed, May 09, 2012 at 10:01:37AM -0700, Jose Fonseca wrote:
> Something else is not right here, as
>
> lp_build_const_vec(bld->gallivm, type, -1.0)
>
> and
>
> lp_build_const_int_vec(bld->gallivm, type, -1)
>
> should produce the same output for unnormalized signed integer types.
>
> Which means the error is likely somewhere else:
> - lp_build_const_vec is buggy
elem = LLVMConstInt(elem_type, val*dscale + 0.5, 0);
(int)(-0.5) == 0, not -1
OG.
More information about the mesa-dev
mailing list