https://bugs.freedesktop.org/show_bug.cgi?id=83570
--- Comment #11 from Roland Scheidegger <srol...@vmware.com> --- (In reply to comment #10) > Could be totally borked, but this is what I have at the moment: > > if (type.floating) { > return LLVMBuildFDiv(builder, a, b, ""); > } > else { > //The spec says divide by zero is undefined, but shouldn't throw an > exception > LLVMValueRef zeromask = lp_build_cmp(bld, > PIPE_FUNC_EQUAL, > b, > lp_build_zero(bld->gallivm,type)); > if (type.sign) { > return lp_build_select(bld, > zeromask, > bld->undef, > LLVMBuildSDiv(builder, a, b, "")); > } > else { > return lp_build_select(bld, > zeromask, > bld->undef, > LLVMBuildUDiv(builder, a, b, "")); > } > } > > I'll take a look at udiv_emit_cpu Hmm that can't quite work since you still do the division by zero, you just don't use the result in the end. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev