OSDN Git Service

mesa: When unpacking signed integer pixel data, don't clamp to 0.
authorEric Anholt <eric@anholt.net>
Tue, 24 Jan 2012 22:48:56 +0000 (14:48 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 7 Feb 2012 18:20:07 +0000 (10:20 -0800)
commit05ff4d209d67962c6f367a94dcf0045ea242d5c3
tree5f7a7a47207ac4de52854aee9b3289bd15bba455
parentc1ccb52c72e73ad657bc5b5d2cb04759953fd3ab
mesa: When unpacking signed integer pixel data, don't clamp to 0.

In the core, we always treat spans of int/uint data as uint, so this
extract function was truncating storage of integer pixel data to a n
int texture to (0, max_int) instead of (min_int, max_int).  There is
probably missing code for handling truncation on conversion between
pixel formats, still, but this does improve things.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit dadbec1e90415f0744eb91e684bf9d7496f474c0)
src/mesa/main/pack.c