On 12/18/2014 09:55 AM, Olivier Galibert wrote:
> Something is not clear to me: In which way -1 is incorrect?
> 

Hi Olivier,

The values being queried are the front and back stencil masks. Masks are
(conceptually?) an unsigned integer, AFAIU. Also, the test I'm trying to
fix fails precisely because it expects a non-negative integer.

> Also, w.r.t comments, what you're doing is masking, not clamping,
> which incidentally is a good thing since clamping would be severely
> bad for stencil.
> 

Clamping here means I'm converting an unsigned integer value (32 bits)
to a signed int (31 bits). Bit masking is the operation used to perform
that (because we can ignore the sign), but that's an "implementation
detail" if you will. The problem is fitting an unsigned int in a signed int.

Probably calling it clamping is confusing, I don't know. In any case the
final patch dropped that.

cheers,
Eduardo


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to