2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
6 * Copyright (c) 2008 VMware, Inc.
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 * Texture image storage routines.
42 extern GLboolean
_mesa_texstore_rgba(TEXSTORE_PARAMS
);
43 extern GLboolean
_mesa_texstore_color_index(TEXSTORE_PARAMS
);
44 extern GLboolean
_mesa_texstore_rgba8888(TEXSTORE_PARAMS
);
45 extern GLboolean
_mesa_texstore_argb8888(TEXSTORE_PARAMS
);
46 extern GLboolean
_mesa_texstore_rgb888(TEXSTORE_PARAMS
);
47 extern GLboolean
_mesa_texstore_bgr888(TEXSTORE_PARAMS
);
48 extern GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS
);
49 extern GLboolean
_mesa_texstore_rgb565_rev(TEXSTORE_PARAMS
);
50 extern GLboolean
_mesa_texstore_rgba4444(TEXSTORE_PARAMS
);
51 extern GLboolean
_mesa_texstore_argb4444(TEXSTORE_PARAMS
);
52 extern GLboolean
_mesa_texstore_argb4444_rev(TEXSTORE_PARAMS
);
53 extern GLboolean
_mesa_texstore_rgba5551(TEXSTORE_PARAMS
);
54 extern GLboolean
_mesa_texstore_argb1555(TEXSTORE_PARAMS
);
55 extern GLboolean
_mesa_texstore_argb1555_rev(TEXSTORE_PARAMS
);
56 extern GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS
);
57 extern GLboolean
_mesa_texstore_al88_rev(TEXSTORE_PARAMS
);
58 extern GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS
);
59 extern GLboolean
_mesa_texstore_a8(TEXSTORE_PARAMS
);
60 extern GLboolean
_mesa_texstore_ci8(TEXSTORE_PARAMS
);
61 extern GLboolean
_mesa_texstore_ycbcr(TEXSTORE_PARAMS
);
62 extern GLboolean
_mesa_texstore_z24_s8(TEXSTORE_PARAMS
);
63 extern GLboolean
_mesa_texstore_s8_z24(TEXSTORE_PARAMS
);
64 extern GLboolean
_mesa_texstore_z16(TEXSTORE_PARAMS
);
65 extern GLboolean
_mesa_texstore_z32(TEXSTORE_PARAMS
);
66 extern GLboolean
_mesa_texstore_rgba_float32(TEXSTORE_PARAMS
);
67 extern GLboolean
_mesa_texstore_rgba_float16(TEXSTORE_PARAMS
);
68 extern GLboolean
_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS
);
69 extern GLboolean
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS
);
70 extern GLboolean
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS
);
71 extern GLboolean
_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS
);
72 extern GLboolean
_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS
);
73 extern GLboolean
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS
);
74 #if FEATURE_EXT_texture_sRGB
75 extern GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS
);
76 extern GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS
);
77 extern GLboolean
_mesa_texstore_sargb8(TEXSTORE_PARAMS
);
78 extern GLboolean
_mesa_texstore_sl8(TEXSTORE_PARAMS
);
79 extern GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS
);
81 extern GLboolean
_mesa_texstore_dudv8(TEXSTORE_PARAMS
);
84 _mesa_make_temp_chan_image(GLcontext
*ctx
, GLuint dims
,
85 GLenum logicalBaseFormat
,
86 GLenum textureBaseFormat
,
87 GLint srcWidth
, GLint srcHeight
, GLint srcDepth
,
88 GLenum srcFormat
, GLenum srcType
,
89 const GLvoid
*srcAddr
,
90 const struct gl_pixelstore_attrib
*srcPacking
);
94 _mesa_set_fetch_functions(struct gl_texture_image
*texImage
, GLuint dims
);
98 _mesa_store_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
100 GLint width
, GLint border
,
101 GLenum format
, GLenum type
, const GLvoid
*pixels
,
102 const struct gl_pixelstore_attrib
*packing
,
103 struct gl_texture_object
*texObj
,
104 struct gl_texture_image
*texImage
);
108 _mesa_store_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
109 GLint internalFormat
,
110 GLint width
, GLint height
, GLint border
,
111 GLenum format
, GLenum type
, const GLvoid
*pixels
,
112 const struct gl_pixelstore_attrib
*packing
,
113 struct gl_texture_object
*texObj
,
114 struct gl_texture_image
*texImage
);
118 _mesa_store_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
119 GLint internalFormat
,
120 GLint width
, GLint height
, GLint depth
, GLint border
,
121 GLenum format
, GLenum type
, const GLvoid
*pixels
,
122 const struct gl_pixelstore_attrib
*packing
,
123 struct gl_texture_object
*texObj
,
124 struct gl_texture_image
*texImage
);
128 _mesa_store_texsubimage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
129 GLint xoffset
, GLint width
,
130 GLenum format
, GLenum type
, const GLvoid
*pixels
,
131 const struct gl_pixelstore_attrib
*packing
,
132 struct gl_texture_object
*texObj
,
133 struct gl_texture_image
*texImage
);
137 _mesa_store_texsubimage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
138 GLint xoffset
, GLint yoffset
,
139 GLint width
, GLint height
,
140 GLenum format
, GLenum type
, const GLvoid
*pixels
,
141 const struct gl_pixelstore_attrib
*packing
,
142 struct gl_texture_object
*texObj
,
143 struct gl_texture_image
*texImage
);
147 _mesa_store_texsubimage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
148 GLint xoffset
, GLint yoffset
, GLint zoffset
,
149 GLint width
, GLint height
, GLint depth
,
150 GLenum format
, GLenum type
, const GLvoid
*pixels
,
151 const struct gl_pixelstore_attrib
*packing
,
152 struct gl_texture_object
*texObj
,
153 struct gl_texture_image
*texImage
);
157 _mesa_store_compressed_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
158 GLint internalFormat
,
159 GLint width
, GLint border
,
160 GLsizei imageSize
, const GLvoid
*data
,
161 struct gl_texture_object
*texObj
,
162 struct gl_texture_image
*texImage
);
165 _mesa_store_compressed_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
166 GLint internalFormat
,
167 GLint width
, GLint height
, GLint border
,
168 GLsizei imageSize
, const GLvoid
*data
,
169 struct gl_texture_object
*texObj
,
170 struct gl_texture_image
*texImage
);
173 _mesa_store_compressed_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
174 GLint internalFormat
,
175 GLint width
, GLint height
, GLint depth
,
177 GLsizei imageSize
, const GLvoid
*data
,
178 struct gl_texture_object
*texObj
,
179 struct gl_texture_image
*texImage
);
183 _mesa_store_compressed_texsubimage1d(GLcontext
*ctx
, GLenum target
,
185 GLint xoffset
, GLsizei width
,
187 GLsizei imageSize
, const GLvoid
*data
,
188 struct gl_texture_object
*texObj
,
189 struct gl_texture_image
*texImage
);
192 _mesa_store_compressed_texsubimage2d(GLcontext
*ctx
, GLenum target
,
194 GLint xoffset
, GLint yoffset
,
195 GLsizei width
, GLsizei height
,
197 GLsizei imageSize
, const GLvoid
*data
,
198 struct gl_texture_object
*texObj
,
199 struct gl_texture_image
*texImage
);
202 _mesa_store_compressed_texsubimage3d(GLcontext
*ctx
, GLenum target
,
204 GLint xoffset
, GLint yoffset
, GLint zoffset
,
205 GLsizei width
, GLsizei height
, GLsizei depth
,
207 GLsizei imageSize
, const GLvoid
*data
,
208 struct gl_texture_object
*texObj
,
209 struct gl_texture_image
*texImage
);
213 _mesa_get_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
214 GLenum format
, GLenum type
, GLvoid
*pixels
,
215 struct gl_texture_object
*texObj
,
216 struct gl_texture_image
*texImage
);
220 _mesa_get_compressed_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
222 struct gl_texture_object
*texObj
,
223 struct gl_texture_image
*texImage
);
225 extern const GLvoid
*
226 _mesa_validate_pbo_teximage(GLcontext
*ctx
, GLuint dimensions
,
227 GLsizei width
, GLsizei height
, GLsizei depth
,
228 GLenum format
, GLenum type
, const GLvoid
*pixels
,
229 const struct gl_pixelstore_attrib
*unpack
,
230 const char *funcName
);
232 extern const GLvoid
*
233 _mesa_validate_pbo_compressed_teximage(GLcontext
*ctx
,
234 GLsizei imageSize
, const GLvoid
*pixels
,
235 const struct gl_pixelstore_attrib
*packing
,
236 const char *funcName
);
239 _mesa_unmap_teximage_pbo(GLcontext
*ctx
,
240 const struct gl_pixelstore_attrib
*unpack
);