mesa: Add support for unpacking 32-bit integer formats to int spans.
[mesa.git] / src / mesa / main / format_unpack.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (c) 2011 VMware, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24 #ifndef FORMAT_UNPACK_H
25 #define FORMAT_UNPACK_H
26
27 extern void
28 _mesa_unpack_rgba_row(gl_format format, GLuint n,
29 const void *src, GLfloat dst[][4]);
30
31
32 void
33 _mesa_unpack_int_rgba_row(gl_format format, GLuint n,
34 const void *src, GLuint dst[][4]);
35
36 extern void
37 _mesa_unpack_rgba_block(gl_format format,
38 const void *src, GLint srcRowStride,
39 GLfloat dst[][4], GLint dstRowStride,
40 GLuint x, GLuint y, GLuint width, GLuint height);
41
42 extern void
43 _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
44 const void *src, GLuint dst[][4]);
45
46
47 extern void
48 _mesa_unpack_float_z_row(gl_format format, GLuint n,
49 const void *src, GLfloat *dst);
50
51
52 void
53 _mesa_unpack_uint_z_row(gl_format format, GLuint n,
54 const void *src, GLuint *dst);
55
56 void
57 _mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
58 const void *src, GLubyte *dst);
59
60 void
61 _mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
62 const void *src, GLuint *dst);
63
64
65 #endif /* FORMAT_UNPACK_H */