mesa: Remove _mesa_unpack_color_span_ubyte
[mesa.git] / src / mesa / main / pack.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
5 * Copyright (C) 1999-2010 VMware, Inc. All Rights Reserved.
6 *
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:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
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 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
27 #ifndef PACK_H
28 #define PACK_H
29
30
31 #include "mtypes.h"
32
33
34 extern void
35 _mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
36 const struct gl_pixelstore_attrib *unpacking);
37
38
39 extern void
40 _mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest,
41 const struct gl_pixelstore_attrib *packing);
42
43
44 extern void
45 _mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source,
46 GLubyte *dest, const struct gl_pixelstore_attrib *packing);
47
48
49 extern void
50 _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n,
51 GLfloat rgba[][4],
52 GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
53 const struct gl_pixelstore_attrib *dstPacking,
54 GLbitfield transferOps);
55
56
57 extern void
58 _mesa_unpack_color_span_float(struct gl_context *ctx,
59 GLuint n, GLenum dstFormat, GLfloat dest[],
60 GLenum srcFormat, GLenum srcType,
61 const GLvoid *source,
62 const struct gl_pixelstore_attrib *srcPacking,
63 GLbitfield transferOps);
64
65
66 extern void
67 _mesa_unpack_index_span(struct gl_context *ctx, GLuint n,
68 GLenum dstType, GLvoid *dest,
69 GLenum srcType, const GLvoid *source,
70 const struct gl_pixelstore_attrib *srcPacking,
71 GLbitfield transferOps);
72
73
74 extern void
75 _mesa_pack_index_span(struct gl_context *ctx, GLuint n,
76 GLenum dstType, GLvoid *dest, const GLuint *source,
77 const struct gl_pixelstore_attrib *dstPacking,
78 GLbitfield transferOps);
79
80
81 extern void
82 _mesa_unpack_stencil_span(struct gl_context *ctx, GLuint n,
83 GLenum dstType, GLvoid *dest,
84 GLenum srcType, const GLvoid *source,
85 const struct gl_pixelstore_attrib *srcPacking,
86 GLbitfield transferOps);
87
88 extern void
89 _mesa_pack_stencil_span(struct gl_context *ctx, GLuint n,
90 GLenum dstType, GLvoid *dest, const GLubyte *source,
91 const struct gl_pixelstore_attrib *dstPacking);
92
93
94 extern void
95 _mesa_unpack_depth_span(struct gl_context *ctx, GLuint n,
96 GLenum dstType, GLvoid *dest, GLuint depthMax,
97 GLenum srcType, const GLvoid *source,
98 const struct gl_pixelstore_attrib *srcPacking);
99
100 extern void
101 _mesa_pack_depth_span(struct gl_context *ctx, GLuint n, GLvoid *dest,
102 GLenum dstType, const GLfloat *depthSpan,
103 const struct gl_pixelstore_attrib *dstPacking);
104
105
106 extern void
107 _mesa_pack_depth_stencil_span(struct gl_context *ctx,GLuint n,
108 GLenum dstType, GLuint *dest,
109 const GLfloat *depthVals,
110 const GLubyte *stencilVals,
111 const struct gl_pixelstore_attrib *dstPacking);
112
113
114 extern void *
115 _mesa_unpack_image(GLuint dimensions,
116 GLsizei width, GLsizei height, GLsizei depth,
117 GLenum format, GLenum type, const GLvoid *pixels,
118 const struct gl_pixelstore_attrib *unpack);
119
120
121 void
122 _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][4],
123 GLenum dstFormat, GLenum dstType,
124 GLvoid *dstAddr);
125
126
127 void
128 _mesa_pack_rgba_span_from_ints(struct gl_context *ctx, GLuint n, GLint rgba[][4],
129 GLenum dstFormat, GLenum dstType,
130 GLvoid *dstAddr);
131
132
133 extern void
134 _mesa_rebase_rgba_float(GLuint n, GLfloat rgba[][4], GLenum baseFormat);
135
136 extern void
137 _mesa_rebase_rgba_uint(GLuint n, GLuint rgba[][4], GLenum baseFormat);
138
139 extern void
140 _mesa_pack_luminance_from_rgba_float(GLuint n, GLfloat rgba[][4],
141 GLvoid *dstAddr, GLenum dst_format,
142 GLbitfield transferOps);
143
144 extern void
145 _mesa_pack_luminance_from_rgba_integer(GLuint n, GLuint rgba[][4], bool rgba_is_signed,
146 GLvoid *dstAddr, GLenum dst_format,
147 GLenum dst_type);
148
149 extern GLfloat *
150 _mesa_unpack_color_index_to_rgba_float(struct gl_context *ctx, GLuint dims,
151 const void *src, GLenum srcFormat, GLenum srcType,
152 int srcWidth, int srcHeight, int srcDepth,
153 const struct gl_pixelstore_attrib *srcPacking,
154 GLbitfield transferOps);
155
156 extern GLubyte *
157 _mesa_unpack_color_index_to_rgba_ubyte(struct gl_context *ctx, GLuint dims,
158 const void *src, GLenum srcFormat, GLenum srcType,
159 int srcWidth, int srcHeight, int srcDepth,
160 const struct gl_pixelstore_attrib *srcPacking,
161 GLbitfield transferOps);
162
163 #endif