glsl2: Add and use new variable mode ir_var_temporary
[mesa/nouveau-pmpeg.git] / src / gallium / state_trackers / python / u_format.i
blob2184b4208437a3b08a92a8a4e56cda7791fc1ac3
1 /**************************************************************************
3 * Copyright 2010 VMware, Inc.
4 * All Rights Reserved.
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
24 * of the Software.
26 **************************************************************************/
29 static INLINE const char *
30 util_format_name(enum pipe_format format);
32 static INLINE boolean
33 util_format_is_s3tc(enum pipe_format format);
35 static INLINE boolean
36 util_format_is_depth_or_stencil(enum pipe_format format);
38 static INLINE boolean
39 util_format_is_depth_and_stencil(enum pipe_format format);
42 uint
43 util_format_get_blocksizebits(enum pipe_format format);
45 uint
46 util_format_get_blocksize(enum pipe_format format);
48 uint
49 util_format_get_blockwidth(enum pipe_format format);
51 uint
52 util_format_get_blockheight(enum pipe_format format);
54 unsigned
55 util_format_get_nblocksx(enum pipe_format format,
56 unsigned x);
58 unsigned
59 util_format_get_nblocksy(enum pipe_format format,
60 unsigned y);
62 unsigned
63 util_format_get_nblocks(enum pipe_format format,
64 unsigned width,
65 unsigned height);
67 size_t
68 util_format_get_stride(enum pipe_format format,
69 unsigned width);
71 size_t
72 util_format_get_2d_size(enum pipe_format format,
73 size_t stride,
74 unsigned height);
76 uint
77 util_format_get_component_bits(enum pipe_format format,
78 enum util_format_colorspace colorspace,
79 uint component);
81 boolean
82 util_format_has_alpha(enum pipe_format format);
85 unsigned
86 util_format_get_nr_components(enum pipe_format format);