1 /**************************************************************************
3 * Copyright
2010 VMware
, Inc.
6 * Permission is hereby granted
, free of charge
, to any person obtaining a
7 * copy of this software and associated documentation files
(the
8 * "Software"), to deal in the Software without restriction
, including
9 * without limitation the rights to use
, copy
, modify
, merge
, publish
,
10 * distribute
, sub license
, and
/or sell copies of the Software
, and to
11 * permit persons to whom the Software is furnished to do so
, subject to
12 * the following conditions
:
14 * THE SOFTWARE
IS PROVIDED
"AS IS", WITHOUT WARRANTY
OF ANY KIND
, EXPRESS
OR
15 * IMPLIED
, INCLUDING BUT
NOT LIMITED
TO THE WARRANTIES
OF MERCHANTABILITY
,
16 * FITNESS
FOR A PARTICULAR PURPOSE
AND NON-INFRINGEMENT.
IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDERS
, AUTHORS
AND/OR ITS SUPPLIERS BE LIABLE
FOR ANY CLAIM
,
18 * DAMAGES
OR OTHER LIABILITY
, WHETHER
IN AN ACTION
OF CONTRACT
, TORT
OR
19 * OTHERWISE, ARISING
FROM, OUT
OF OR IN CONNECTION
WITH THE SOFTWARE
OR THE
20 * USE OR OTHER DEALINGS
IN THE SOFTWARE.
22 * The above copyright notice and this permission notice
(including the
23 * next paragraph
) shall be included in all copies or substantial portions
26 **************************************************************************/
29 static INLINE const char
*
30 util_format_name
(enum pipe_format format
);
33 util_format_is_s3tc
(enum pipe_format format
);
36 util_format_is_depth_or_stencil
(enum pipe_format format
);
39 util_format_is_depth_and_stencil
(enum pipe_format format
);
43 util_format_get_blocksizebits
(enum pipe_format format
);
46 util_format_get_blocksize
(enum pipe_format format
);
49 util_format_get_blockwidth
(enum pipe_format format
);
52 util_format_get_blockheight
(enum pipe_format format
);
55 util_format_get_nblocksx
(enum pipe_format format
,
59 util_format_get_nblocksy
(enum pipe_format format
,
63 util_format_get_nblocks
(enum pipe_format format
,
68 util_format_get_stride
(enum pipe_format format
,
72 util_format_get_2d_size
(enum pipe_format format
,
77 util_format_get_component_bits
(enum pipe_format format
,
78 enum util_format_colorspace colorspace
,
82 util_format_has_alpha
(enum pipe_format format
);
86 util_format_get_nr_components
(enum pipe_format format
);