From: Dave Airlie Date: Tue, 28 Feb 2012 10:43:14 +0000 (+0000) Subject: gallivm: add frem support to the lp_build_mod helper. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a46548e0effa45d31b536c1af97b8dcacbe2db8e;p=mesa.git gallivm: add frem support to the lp_build_mod helper. for completeness. Signed-off-by: Dave Airlie --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 65fc1809913..60018447e02 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -2565,10 +2565,11 @@ lp_build_mod(struct lp_build_context *bld, LLVMValueRef res; const struct lp_type type = bld->type; - assert(type.floating); assert(lp_check_value(type, x)); assert(lp_check_value(type, y)); + if (type.floating) + res = LLVMBuildFRem(builder, x, y, ""); if (type.sign) res = LLVMBuildSRem(builder, x, y, ""); else