Commit graph

18 commits

Author SHA1 Message Date
José Fonseca
a47674ee89 util/u_format: Tighten the meaning of is_array bit to exclude mixed type formats.
This is what we want in practice.

The only change is in PIPE_FORMAT_R8SG8SB8UX8U_NORM, which no longer is
considered an array format.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-29 14:08:42 +00:00
Dave Airlie
4ca624f8e0 u_format: fix inv_swizzles generation
inv_swizzles is used in lp_tile_soa.py to create lp_tile_soa.c, we overwrite swizzles if they are already set.

This results in the i8 format getting alpha instead of red, and the l8 format
getting blue instead of red.

Fixes fbo-alphatest-formats, fbo-alphatest-formats ARB_texture_float,
and fbo-alphatest-formats EXT_texture_snorm on llvmpipe.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-30 13:43:52 +00:00
Dave Airlie
a441feb757 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>
2011-10-08 17:44:59 +01:00
Vinson Lee
82049b9595 util: Remove unnecessary semicolons in Python scripts. 2010-05-19 06:43:14 -07:00
José Fonseca
948ac63112 util: is_array/mixed/etc is only meaningful for plain formats. 2010-04-08 19:03:40 +01:00
José Fonseca
2c06fa4682 util: Support fixed formats conversion. 2010-04-07 22:16:18 +01:00
Roland Scheidegger
4e9690f00c gallium: make the python scripts for format parsing not fail on new formats
they won't generate any useful conversion code for some of the new formats
but at least don't assert. Also needed some more hacks so they don't generate
code for some of the new formats, as gcc was not impressed.
Also declare unused channels as void, and change the scripts to not fail if
the first channel happened to be unused.
Needs serious fixing.
2010-03-30 01:33:28 +02:00
José Fonseca
f342ceca38 util: Fix the maximum value computation for SSCALED channels. 2010-03-06 12:49:14 +00:00
José Fonseca
cfde6c50ae util: Add a new flag, for formats that can be described as a bitmask. 2010-03-06 12:48:39 +00:00
José Fonseca
4757325951 util: Factor some code into u_format_parse.py 2010-02-26 16:46:34 +00:00
José Fonseca
092010db37 util: Use python names consistent with u_format.h 2010-02-26 16:46:34 +00:00
José Fonseca
e2b02ea9db util: Add is_pot() method to formats. 2010-02-26 10:12:53 +00:00
Vinson Lee
3e882e943c util: Remove import of unused sys module. 2010-02-25 17:55:36 -08:00
José Fonseca
816d23505a util: Kill array vs arith layouts. Revamp UTIL_FORMAT_LAYOUT_xxx.
Too confusing. I now can get the same information through other means.
2010-02-24 16:16:21 +00:00
José Fonseca
943314f38f util: Factor out the code to shorten a format name. 2010-02-24 15:45:28 +00:00
José Fonseca
b57d80da77 util: Allow '#' comments in u_format.csv. 2010-02-24 15:45:28 +00:00
José Fonseca
5dce9b252b util: Store more derived data in the the format description. 2010-02-24 12:15:13 +00:00
José Fonseca
3d30524393 util: Auto generate pixel format accessor functions from
This has several advantages over the u_
 - not hand written
 - no intermediate memcpy of raw pixels
 - supports 4 ubytes in addition to floats
 - no need to pass a pipe_transfer

It also has (hopefully temporary) limitations:
 - no support for YUV
 - no support for SRGB
2009-08-30 12:37:03 +01:00