[Mesa-dev] [Bug 67672] [llvmpipe] lp_test_arit fails on old CPUs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 24 11:59:41 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=67672

José Fonseca <jfonseca at vmware.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jfonseca at vmware.com
           Assignee|mesa-dev at lists.freedesktop. |sroland at vmware.com
                   |org                         |
            Summary|9.2 git, Test failure in    |[llvmpipe] lp_test_arit
                   |src/gallium/drivers/llvmpip |fails on old CPUs
                   |e                           |

--- Comment #26 from José Fonseca <jfonseca at vmware.com> ---
(In reply to Roland Scheidegger from comment #25)
> Could you try this fix?

It's straighfoward to repro the bug on any modern CPU with
https://software.intel.com/en-us/articles/intel-software-development-emulator :

$ GALLIUM_DUMP_CPU=1 /var/lib/hudson/tools/lin64/sde/sde64  -p4p --
build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_arit
util_cpu_caps.nr_cpus = 8
util_cpu_caps.x86_cpu_type = 8
util_cpu_caps.cacheline = 64
util_cpu_caps.has_tsc = 1
util_cpu_caps.has_mmx = 1
util_cpu_caps.has_mmx2 = 1
util_cpu_caps.has_sse = 1
util_cpu_caps.has_sse2 = 1
util_cpu_caps.has_sse3 = 1
util_cpu_caps.has_ssse3 = 0
util_cpu_caps.has_sse4_1 = 0
util_cpu_caps.has_sse4_2 = 0
util_cpu_caps.has_avx = 0
util_cpu_caps.has_avx2 = 0
util_cpu_caps.has_f16c = 0
util_cpu_caps.has_popcnt = 0
util_cpu_caps.has_3dnow = 0
util_cpu_caps.has_3dnow_ext = 0
util_cpu_caps.has_xop = 0
util_cpu_caps.has_altivec = 0
util_cpu_caps.has_daz = 1
floor(-0): ref = -1, out = 0, precision = -0.000000 bits, FAIL
ceil(0): ref = 1, out = 0, precision = -0.000000 bits, FAIL
fract(-0): ref = 0.99999994, out = -0, precision = -0.000000 bits, FAIL


And I've verified that Roland's patch fixes it:

$ GALLIUM_DUMP_CPU=1 /var/lib/hudson/tools/lin64/sde/sde64  -p4p --
build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_arit
util_cpu_caps.nr_cpus = 8
util_cpu_caps.x86_cpu_type = 8
util_cpu_caps.cacheline = 64
util_cpu_caps.has_tsc = 1
util_cpu_caps.has_mmx = 1
util_cpu_caps.has_mmx2 = 1
util_cpu_caps.has_sse = 1
util_cpu_caps.has_sse2 = 1
util_cpu_caps.has_sse3 = 1
util_cpu_caps.has_ssse3 = 0
util_cpu_caps.has_sse4_1 = 0
util_cpu_caps.has_sse4_2 = 0
util_cpu_caps.has_avx = 0
util_cpu_caps.has_avx2 = 0
util_cpu_caps.has_f16c = 0
util_cpu_caps.has_popcnt = 0
util_cpu_caps.has_3dnow = 0
util_cpu_caps.has_3dnow_ext = 0
util_cpu_caps.has_xop = 0
util_cpu_caps.has_altivec = 0
util_cpu_caps.has_daz = 1
$

Roland, I just have a few suggestiongs for the patch:
- let's move the FTZ/DAZ code two an helpers 
- we should call the helper also on the results
- we should leave the sign bit alone, ie, `val.ui &= 0xff800000` -> `val.ui &=
0x7f800000`.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141124/e379effb/attachment.html>


More information about the mesa-dev mailing list