2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2006 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.
28 * Texture image storage routines.
41 extern GLboolean
_mesa_texstore_rgba(TEXSTORE_PARAMS
);
42 extern GLboolean
_mesa_texstore_color_index(TEXSTORE_PARAMS
);
43 extern GLboolean
_mesa_texstore_rgba8888(TEXSTORE_PARAMS
);
44 extern GLboolean
_mesa_texstore_argb8888(TEXSTORE_PARAMS
);
45 extern GLboolean
_mesa_texstore_rgb888(TEXSTORE_PARAMS
);
46 extern GLboolean
_mesa_texstore_bgr888(TEXSTORE_PARAMS
);
47 extern GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS
);
48 extern GLboolean
_mesa_texstore_rgb565_rev(TEXSTORE_PARAMS
);
49 extern GLboolean
_mesa_texstore_argb4444(TEXSTORE_PARAMS
);
50 extern GLboolean
_mesa_texstore_argb4444_rev(TEXSTORE_PARAMS
);
51 extern GLboolean
_mesa_texstore_argb1555(TEXSTORE_PARAMS
);
52 extern GLboolean
_mesa_texstore_argb1555_rev(TEXSTORE_PARAMS
);
53 extern GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS
);
54 extern GLboolean
_mesa_texstore_al88_rev(TEXSTORE_PARAMS
);
55 extern GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS
);
56 extern GLboolean
_mesa_texstore_a8(TEXSTORE_PARAMS
);
57 extern GLboolean
_mesa_texstore_ci8(TEXSTORE_PARAMS
);
58 extern GLboolean
_mesa_texstore_ycbcr(TEXSTORE_PARAMS
);
59 extern GLboolean
_mesa_texstore_z24_s8(TEXSTORE_PARAMS
);
60 extern GLboolean
_mesa_texstore_z16(TEXSTORE_PARAMS
);
61 extern GLboolean
_mesa_texstore_z32(TEXSTORE_PARAMS
);
62 extern GLboolean
_mesa_texstore_rgba_float32(TEXSTORE_PARAMS
);
63 extern GLboolean
_mesa_texstore_rgba_float16(TEXSTORE_PARAMS
);
64 extern GLboolean
_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS
);
65 extern GLboolean
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS
);
66 extern GLboolean
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS
);
67 extern GLboolean
_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS
);
68 extern GLboolean
_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS
);
69 extern GLboolean
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS
);
70 #if FEATURE_EXT_texture_sRGB
71 extern GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS
);
72 extern GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS
);
73 extern GLboolean
_mesa_texstore_sl8(TEXSTORE_PARAMS
);
74 extern GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS
);
79 _mesa_make_temp_chan_image(GLcontext
*ctx
, GLuint dims
,
80 GLenum logicalBaseFormat
,
81 GLenum textureBaseFormat
,
82 GLint srcWidth
, GLint srcHeight
, GLint srcDepth
,
83 GLenum srcFormat
, GLenum srcType
,
84 const GLvoid
*srcAddr
,
85 const struct gl_pixelstore_attrib
*srcPacking
);
89 _mesa_store_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
91 GLint width
, GLint border
,
92 GLenum format
, GLenum type
, const GLvoid
*pixels
,
93 const struct gl_pixelstore_attrib
*packing
,
94 struct gl_texture_object
*texObj
,
95 struct gl_texture_image
*texImage
);
99 _mesa_store_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
100 GLint internalFormat
,
101 GLint width
, GLint height
, GLint border
,
102 GLenum format
, GLenum type
, const GLvoid
*pixels
,
103 const struct gl_pixelstore_attrib
*packing
,
104 struct gl_texture_object
*texObj
,
105 struct gl_texture_image
*texImage
);
109 _mesa_store_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
110 GLint internalFormat
,
111 GLint width
, GLint height
, GLint depth
, GLint border
,
112 GLenum format
, GLenum type
, const GLvoid
*pixels
,
113 const struct gl_pixelstore_attrib
*packing
,
114 struct gl_texture_object
*texObj
,
115 struct gl_texture_image
*texImage
);
119 _mesa_store_texsubimage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
120 GLint xoffset
, GLint width
,
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_texsubimage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
129 GLint xoffset
, GLint yoffset
,
130 GLint width
, GLint height
,
131 GLenum format
, GLenum type
, const GLvoid
*pixels
,
132 const struct gl_pixelstore_attrib
*packing
,
133 struct gl_texture_object
*texObj
,
134 struct gl_texture_image
*texImage
);
138 _mesa_store_texsubimage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
139 GLint xoffset
, GLint yoffset
, GLint zoffset
,
140 GLint width
, GLint height
, GLint depth
,
141 GLenum format
, GLenum type
, const GLvoid
*pixels
,
142 const struct gl_pixelstore_attrib
*packing
,
143 struct gl_texture_object
*texObj
,
144 struct gl_texture_image
*texImage
);
148 _mesa_store_compressed_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
149 GLint internalFormat
,
150 GLint width
, GLint border
,
151 GLsizei imageSize
, const GLvoid
*data
,
152 struct gl_texture_object
*texObj
,
153 struct gl_texture_image
*texImage
);
156 _mesa_store_compressed_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
157 GLint internalFormat
,
158 GLint width
, GLint height
, GLint border
,
159 GLsizei imageSize
, const GLvoid
*data
,
160 struct gl_texture_object
*texObj
,
161 struct gl_texture_image
*texImage
);
164 _mesa_store_compressed_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
165 GLint internalFormat
,
166 GLint width
, GLint height
, GLint depth
,
168 GLsizei imageSize
, const GLvoid
*data
,
169 struct gl_texture_object
*texObj
,
170 struct gl_texture_image
*texImage
);
174 _mesa_store_compressed_texsubimage1d(GLcontext
*ctx
, GLenum target
,
176 GLint xoffset
, GLsizei width
,
178 GLsizei imageSize
, const GLvoid
*data
,
179 struct gl_texture_object
*texObj
,
180 struct gl_texture_image
*texImage
);
183 _mesa_store_compressed_texsubimage2d(GLcontext
*ctx
, GLenum target
,
185 GLint xoffset
, GLint yoffset
,
186 GLsizei width
, GLsizei height
,
188 GLsizei imageSize
, const GLvoid
*data
,
189 struct gl_texture_object
*texObj
,
190 struct gl_texture_image
*texImage
);
193 _mesa_store_compressed_texsubimage3d(GLcontext
*ctx
, GLenum target
,
195 GLint xoffset
, GLint yoffset
, GLint zoffset
,
196 GLsizei width
, GLsizei height
, GLsizei depth
,
198 GLsizei imageSize
, const GLvoid
*data
,
199 struct gl_texture_object
*texObj
,
200 struct gl_texture_image
*texImage
);
204 _mesa_get_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
205 GLenum format
, GLenum type
, GLvoid
*pixels
,
206 struct gl_texture_object
*texObj
,
207 struct gl_texture_image
*texImage
);
211 _mesa_get_compressed_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
213 const struct gl_texture_object
*texObj
,
214 const struct gl_texture_image
*texImage
);
216 extern const GLvoid
*
217 _mesa_validate_pbo_teximage(GLcontext
*ctx
, GLuint dimensions
,
218 GLsizei width
, GLsizei height
, GLsizei depth
,
219 GLenum format
, GLenum type
, const GLvoid
*pixels
,
220 const struct gl_pixelstore_attrib
*unpack
,
221 const char *funcName
);
223 extern const GLvoid
*
224 _mesa_validate_pbo_compressed_teximage(GLcontext
*ctx
,
225 GLsizei imageSize
, const GLvoid
*pixels
,
226 const struct gl_pixelstore_attrib
*packing
,
227 const char *funcName
);
230 _mesa_unmap_teximage_pbo(GLcontext
*ctx
,
231 const struct gl_pixelstore_attrib
*unpack
);