OSDN Git Service

gallium: add initial pure integer support (v2)
authorDave Airlie <airlied@redhat.com>
Mon, 19 Sep 2011 14:04:48 +0000 (15:04 +0100)
committerDave Airlie <airlied@redhat.com>
Sat, 8 Oct 2011 16:44:59 +0000 (17:44 +0100)
commita441feb757b1be4845ba378f0207dcdc5cc1a407
tree63a6b44c082a8850a0001fa8e772d58042123dc4
parentc2060c0af7de4678d55962369244451fe678c4e8
gallium: add initial pure integer support (v2)

This add support for unsigned/signed integer types via adding a 'pure' bit
in the format description table. It adds 4 new u_format get/put hooks,
for get/put uint and get/put sint so that accessors can get native access
to the integer bits. This is used to avoid precision loss via float converting
paths.

It doesn't add any float fetchers for these types at the moment, GL doesn't
require float fetching from these types and I expect we'll introduce a lot
of hidden bugs if we start allowing such conversions without an API mandating
it.

It adds all formats from EXT_texture_integer and EXT_texture_rg.

0 regressions on llvmpipe here with this.

(there is some more follow on code in my gallium-int-work branch, bringing
 softpipe and mesa to a pretty integer clean state)

v2: fixup python generator to get signed->unsigned and unsigned->signed
fetches working.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/util/u_format.c
src/gallium/auxiliary/util/u_format.csv
src/gallium/auxiliary/util/u_format.h
src/gallium/auxiliary/util/u_format_pack.py
src/gallium/auxiliary/util/u_format_parse.py
src/gallium/auxiliary/util/u_format_table.py
src/gallium/auxiliary/util/u_tile.c
src/gallium/auxiliary/util/u_tile.h
src/gallium/drivers/llvmpipe/lp_tile_soa.py
src/gallium/include/pipe/p_format.h