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

--- Comment #3 from Roland Scheidegger <srol...@vmware.com> ---
(In reply to Jose Fonseca from comment #2)
> It's been a long time, but I think Tom's right.  This was a thinko, and my
> intent was the opposite.
Ok that makes sense. With this code only reversing sign with signed type, we'd
still not test full unsigned range though for uint32 types (but not smaller
types), looking at this again.

> 
> 
> > And float range is only from 0 to 2.0f?
> 
> That's correct.  That's sufficient to exercise the clamping.
> 
> Remember that if we generated a range between 0 and a VERY_LARGE_NUMBER,
> then only 1/VERY_LARGE_NUMBER of the cases would actually be in the most
> interesting range of 0..1
Ok, I think the problem is we don't know what we're going to convert to. If we
actually want to test float->int then we'd definitely want very large numbers
(in fact we'd wanted numbers which overflow the target type too) - values
between 0..2 aren't particularly interesting in this case. But for converting
to normalized this is right.
This code of course also does cases which are not really interesting and
probably not hit in practice, like unorm->unsigned (everything is 0 or 1 after
conversion).

-- 
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