2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 struct gl_pixelstore_attrib
;
36 _mesa_swap2( GLushort
*p
, GLuint n
);
39 _mesa_swap4( GLuint
*p
, GLuint n
);
42 _mesa_type_is_packed(GLenum type
);
45 _mesa_sizeof_type( GLenum type
);
48 _mesa_sizeof_packed_type( GLenum type
);
51 _mesa_components_in_format( GLenum format
);
54 _mesa_bytes_per_pixel( GLenum format
, GLenum type
);
57 _mesa_error_check_format_and_type(const struct gl_context
*ctx
,
58 GLenum format
, GLenum type
);
61 _mesa_is_color_format(GLenum format
);
64 _mesa_is_depth_format(GLenum format
);
67 _mesa_is_stencil_format(GLenum format
);
70 _mesa_is_ycbcr_format(GLenum format
);
73 _mesa_is_depthstencil_format(GLenum format
);
76 _mesa_is_depth_or_stencil_format(GLenum format
);
79 _mesa_is_dudv_format(GLenum format
);
82 _mesa_is_integer_format(GLenum format
);
85 _mesa_is_compressed_format(struct gl_context
*ctx
, GLenum format
);
88 _mesa_base_format_has_channel(GLenum base_format
, GLenum pname
);
91 _mesa_image_offset( GLuint dimensions
,
92 const struct gl_pixelstore_attrib
*packing
,
93 GLsizei width
, GLsizei height
,
94 GLenum format
, GLenum type
,
95 GLint img
, GLint row
, GLint column
);
98 _mesa_image_address( GLuint dimensions
,
99 const struct gl_pixelstore_attrib
*packing
,
101 GLsizei width
, GLsizei height
,
102 GLenum format
, GLenum type
,
103 GLint img
, GLint row
, GLint column
);
106 _mesa_image_address1d( const struct gl_pixelstore_attrib
*packing
,
109 GLenum format
, GLenum type
,
113 _mesa_image_address2d( const struct gl_pixelstore_attrib
*packing
,
115 GLsizei width
, GLsizei height
,
116 GLenum format
, GLenum type
,
117 GLint row
, GLint column
);
120 _mesa_image_address3d( const struct gl_pixelstore_attrib
*packing
,
122 GLsizei width
, GLsizei height
,
123 GLenum format
, GLenum type
,
124 GLint img
, GLint row
, GLint column
);
128 _mesa_image_row_stride( const struct gl_pixelstore_attrib
*packing
,
129 GLint width
, GLenum format
, GLenum type
);
133 _mesa_image_image_stride( const struct gl_pixelstore_attrib
*packing
,
134 GLint width
, GLint height
,
135 GLenum format
, GLenum type
);
139 _mesa_expand_bitmap(GLsizei width
, GLsizei height
,
140 const struct gl_pixelstore_attrib
*unpack
,
141 const GLubyte
*bitmap
,
142 GLubyte
*destBuffer
, GLint destStride
,
147 _mesa_convert_colors(GLenum srcType
, const GLvoid
*src
,
148 GLenum dstType
, GLvoid
*dst
,
149 GLuint count
, const GLubyte mask
[]);
153 _mesa_clip_drawpixels(const struct gl_context
*ctx
,
154 GLint
*destX
, GLint
*destY
,
155 GLsizei
*width
, GLsizei
*height
,
156 struct gl_pixelstore_attrib
*unpack
);
160 _mesa_clip_readpixels(const struct gl_context
*ctx
,
161 GLint
*srcX
, GLint
*srcY
,
162 GLsizei
*width
, GLsizei
*height
,
163 struct gl_pixelstore_attrib
*pack
);
166 _mesa_clip_copytexsubimage(const struct gl_context
*ctx
,
167 GLint
*destX
, GLint
*destY
,
168 GLint
*srcX
, GLint
*srcY
,
169 GLsizei
*width
, GLsizei
*height
);
172 _mesa_clip_to_region(GLint xmin
, GLint ymin
,
173 GLint xmax
, GLint ymax
,
175 GLsizei
*width
, GLsizei
*height
);
178 _mesa_clip_blit(struct gl_context
*ctx
,
179 GLint
*srcX0
, GLint
*srcY0
, GLint
*srcX1
, GLint
*srcY1
,
180 GLint
*dstX0
, GLint
*dstY0
, GLint
*dstX1
, GLint
*dstY1
);