mesa/main: Use the RGB <-> sRGB conversion functions in libmesautil
[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 OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25 #ifndef FORMAT_UNPACK_H
26 #define FORMAT_UNPACK_H
27
28 extern void
29 _mesa_unpack_rgba_row(mesa_format format, GLuint n,
30 const void *src, GLfloat dst[][4]);
31
32 extern void
33 _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
34 const void *src, GLubyte dst[][4]);
35
36 void
37 _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
38 const void *src, GLuint dst[][4]);
39
40 extern void
41 _mesa_unpack_rgba_block(mesa_format format,
42 const void *src, GLint srcRowStride,
43 GLfloat dst[][4], GLint dstRowStride,
44 GLuint x, GLuint y, GLuint width, GLuint height);
45
46 extern void
47 _mesa_unpack_float_z_row(mesa_format format, GLuint n,
48 const void *src, GLfloat *dst);
49
50
51 void
52 _mesa_unpack_uint_z_row(mesa_format format, GLuint n,
53 const void *src, GLuint *dst);
54
55 void
56 _mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
57 const void *src, GLubyte *dst);
58
59 void
60 _mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
61 const void *src, GLuint *dst);
62
63 void
64 _mesa_unpack_float_32_uint_24_8_depth_stencil_row(mesa_format format,
65 GLuint n,
66 const void *src,
67 GLuint *dst);
68 void
69 _mesa_unpack_depth_stencil_row(mesa_format format, GLuint n,
70 const void *src, GLenum type,
71 GLuint *dst);
72 #endif /* FORMAT_UNPACK_H */