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

            Bug ID: 106232
           Summary: LLVM unit tests have error in random number handling
           Product: Mesa
           Version: 18.0
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/llvmpipe
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: tom.hudson....@gmail.com
        QA Contact: mesa-dev@lists.freedesktop.org

src/gallium/drivers/llvmpipe/lp_test_main.c:random_elem() seems to have the
logic reversed in its handling of unsigned values:

   if(!type.sign)
      if(rand() & 1)
         value = -value;

This code only generates negative numbers for *unsigned* values.
write_elem() then has code to fix this up:

   if(!type.sign && value < 0.0)
      value = 0.0;

In practice, the unit tests only cover half the possible range of unsigned
values, and the half of the elements they generate they use are all 0.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to