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_argb4444(TEXSTORE_PARAMS
);
51 extern GLboolean
_mesa_texstore_argb4444_rev(TEXSTORE_PARAMS
);
52 extern GLboolean
_mesa_texstore_argb1555(TEXSTORE_PARAMS
);
53 extern GLboolean
_mesa_texstore_argb1555_rev(TEXSTORE_PARAMS
);
54 extern GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS
);
55 extern GLboolean
_mesa_texstore_al88_rev(TEXSTORE_PARAMS
);
56 extern GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS
);
57 extern GLboolean
_mesa_texstore_a8(TEXSTORE_PARAMS
);
58 extern GLboolean
_mesa_texstore_ci8(TEXSTORE_PARAMS
);
59 extern GLboolean
_mesa_texstore_ycbcr(TEXSTORE_PARAMS
);
60 extern GLboolean
_mesa_texstore_z24_s8(TEXSTORE_PARAMS
);
61 extern GLboolean
_mesa_texstore_s8_z24(TEXSTORE_PARAMS
);
62 extern GLboolean
_mesa_texstore_z16(TEXSTORE_PARAMS
);
63 extern GLboolean
_mesa_texstore_z32(TEXSTORE_PARAMS
);
64 extern GLboolean
_mesa_texstore_rgba_float32(TEXSTORE_PARAMS
);
65 extern GLboolean
_mesa_texstore_rgba_float16(TEXSTORE_PARAMS
);
66 extern GLboolean
_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS
);
67 extern GLboolean
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS
);
68 extern GLboolean
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS
);
69 extern GLboolean
_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS
);
70 extern GLboolean
_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS
);
71 extern GLboolean
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS
);
72 #if FEATURE_EXT_texture_sRGB
73 extern GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS
);
74 extern GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS
);
75 extern GLboolean
_mesa_texstore_sargb8(TEXSTORE_PARAMS
);
76 extern GLboolean
_mesa_texstore_sl8(TEXSTORE_PARAMS
);
77 extern GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS
);
82 _mesa_make_temp_chan_image(GLcontext
*ctx
, GLuint dims
,
83 GLenum logicalBaseFormat
,
84 GLenum textureBaseFormat
,
85 GLint srcWidth
, GLint srcHeight
, GLint srcDepth
,
86 GLenum srcFormat
, GLenum srcType
,
87 const GLvoid
*srcAddr
,
88 const struct gl_pixelstore_attrib
*srcPacking
);
92 _mesa_set_fetch_functions(struct gl_texture_image
*texImage
, GLuint dims
);
96 _mesa_store_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
98 GLint width
, GLint border
,
99 GLenum format
, GLenum type
, const GLvoid
*pixels
,
100 const struct gl_pixelstore_attrib
*packing
,
101 struct gl_texture_object
*texObj
,
102 struct gl_texture_image
*texImage
);
106 _mesa_store_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
107 GLint internalFormat
,
108 GLint width
, GLint height
, GLint border
,
109 GLenum format
, GLenum type
, const GLvoid
*pixels
,
110 const struct gl_pixelstore_attrib
*packing
,
111 struct gl_texture_object
*texObj
,
112 struct gl_texture_image
*texImage
);
116 _mesa_store_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
117 GLint internalFormat
,
118 GLint width
, GLint height
, GLint depth
, GLint border
,
119 GLenum format
, GLenum type
, const GLvoid
*pixels
,
120 const struct gl_pixelstore_attrib
*packing
,
121 struct gl_texture_object
*texObj
,
122 struct gl_texture_image
*texImage
);
126 _mesa_store_texsubimage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
127 GLint xoffset
, GLint width
,
128 GLenum format
, GLenum type
, const GLvoid
*pixels
,
129 const struct gl_pixelstore_attrib
*packing
,
130 struct gl_texture_object
*texObj
,
131 struct gl_texture_image
*texImage
);
135 _mesa_store_texsubimage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
136 GLint xoffset
, GLint yoffset
,
137 GLint width
, GLint height
,
138 GLenum format
, GLenum type
, const GLvoid
*pixels
,
139 const struct gl_pixelstore_attrib
*packing
,
140 struct gl_texture_object
*texObj
,
141 struct gl_texture_image
*texImage
);
145 _mesa_store_texsubimage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
146 GLint xoffset
, GLint yoffset
, GLint zoffset
,
147 GLint width
, GLint height
, GLint depth
,
148 GLenum format
, GLenum type
, const GLvoid
*pixels
,
149 const struct gl_pixelstore_attrib
*packing
,
150 struct gl_texture_object
*texObj
,
151 struct gl_texture_image
*texImage
);
155 _mesa_store_compressed_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
156 GLint internalFormat
,
157 GLint width
, GLint border
,
158 GLsizei imageSize
, const GLvoid
*data
,
159 struct gl_texture_object
*texObj
,
160 struct gl_texture_image
*texImage
);
163 _mesa_store_compressed_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
164 GLint internalFormat
,
165 GLint width
, GLint height
, GLint border
,
166 GLsizei imageSize
, const GLvoid
*data
,
167 struct gl_texture_object
*texObj
,
168 struct gl_texture_image
*texImage
);
171 _mesa_store_compressed_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
172 GLint internalFormat
,
173 GLint width
, GLint height
, GLint depth
,
175 GLsizei imageSize
, const GLvoid
*data
,
176 struct gl_texture_object
*texObj
,
177 struct gl_texture_image
*texImage
);
181 _mesa_store_compressed_texsubimage1d(GLcontext
*ctx
, GLenum target
,
183 GLint xoffset
, GLsizei width
,
185 GLsizei imageSize
, const GLvoid
*data
,
186 struct gl_texture_object
*texObj
,
187 struct gl_texture_image
*texImage
);
190 _mesa_store_compressed_texsubimage2d(GLcontext
*ctx
, GLenum target
,
192 GLint xoffset
, GLint yoffset
,
193 GLsizei width
, GLsizei height
,
195 GLsizei imageSize
, const GLvoid
*data
,
196 struct gl_texture_object
*texObj
,
197 struct gl_texture_image
*texImage
);
200 _mesa_store_compressed_texsubimage3d(GLcontext
*ctx
, GLenum target
,
202 GLint xoffset
, GLint yoffset
, GLint zoffset
,
203 GLsizei width
, GLsizei height
, GLsizei depth
,
205 GLsizei imageSize
, const GLvoid
*data
,
206 struct gl_texture_object
*texObj
,
207 struct gl_texture_image
*texImage
);
211 _mesa_get_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
212 GLenum format
, GLenum type
, GLvoid
*pixels
,
213 struct gl_texture_object
*texObj
,
214 struct gl_texture_image
*texImage
);
218 _mesa_get_compressed_teximage(GLcontext
*ctx
, GLenum target
, GLint level
,
220 struct gl_texture_object
*texObj
,
221 struct gl_texture_image
*texImage
);
223 extern const GLvoid
*
224 _mesa_validate_pbo_teximage(GLcontext
*ctx
, GLuint dimensions
,
225 GLsizei width
, GLsizei height
, GLsizei depth
,
226 GLenum format
, GLenum type
, const GLvoid
*pixels
,
227 const struct gl_pixelstore_attrib
*unpack
,
228 const char *funcName
);
230 extern const GLvoid
*
231 _mesa_validate_pbo_compressed_teximage(GLcontext
*ctx
,
232 GLsizei imageSize
, const GLvoid
*pixels
,
233 const struct gl_pixelstore_attrib
*packing
,
234 const char *funcName
);
237 _mesa_unmap_teximage_pbo(GLcontext
*ctx
,
238 const struct gl_pixelstore_attrib
*unpack
);