[Mesa-dev] X test suite regression due to gallivm change

Roland Scheidegger sroland at vmware.com
Thu Feb 23 20:59:54 UTC 2017

Am 23.02.2017 um 19:51 schrieb Adam Jackson:
> Starting from:
>> commit 320d1191c61a0a82444605c12e5c4b2ee0b241eb
>> Author: Jose Fonseca <jfonseca at vmware.com>
>> Date:   Mon Apr 4 00:05:33 2016 +0100
>>     gallivm: Use llvm.fmuladd.*.
>>     Reviewed-by: Roland Scheidegger <sroland at vmware.com>
> 'make check' in xserver no longer passes on Xephyr+glamor+llvmpipe. At
> least, not on my Skylake. Setting LP_NATIVE_VECTOR_WIDTH=128 fixes it,
> so I assume this is a difference in generated code between AVX2 and
> non-AVX. I haven't dug much further into it yet, just wondering if
> there's any obvious reason AVX would generate noticably different
> rendering after this change, or if this change had been seen to cause
> trouble on other AVX machines.

So, what does the failing test do?
Using fmuladd can generate different output (of course due to using fma
instead of mul+add on cpus supporting it - and indeed we will only use
that with 256bit vectors when we emit avx2 code). Typically, the
difference should be unnoticeable (and in particular we should not do
anything which isn't allowed by apis). But if you do strange things
(like forgetting about half-pixel offsets or such) and then relying on
rounding always falling on the same side there might be some surprises.
It is of course possible there's a genuine llvmpipe/gallivm/draw bug


More information about the mesa-dev mailing list