2 * Copyright (C) 2008 Nicolai Haehnle.
3 * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
5 * The Weather Channel (TM) funded Tungsten Graphics to develop the
6 * initial release of the Radeon 8500 driver under the XFree86 license.
7 * This notice must be preserved.
9 * Permission is hereby granted, free of charge, to any person obtaining
10 * a copy of this software and associated documentation files (the
11 * "Software"), to deal in the Software without restriction, including
12 * without limitation the rights to use, copy, modify, merge, publish,
13 * distribute, sublicense, and/or sell copies of the Software, and to
14 * permit persons to whom the Software is furnished to do so, subject to
15 * the following conditions:
17 * The above copyright notice and this permission notice (including the
18 * next paragraph) shall be included in all copies or substantial
19 * portions of the Software.
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
25 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #ifndef RADEON_TEXTURE_H
32 #define RADEON_TEXTURE_H
33 struct gl_texture_image
*radeonNewTextureImage(GLcontext
*ctx
);
34 void radeonFreeTexImageData(GLcontext
*ctx
, struct gl_texture_image
*timage
);
36 void radeon_teximage_map(radeon_texture_image
*image
, GLboolean write_enable
);
37 void radeon_teximage_unmap(radeon_texture_image
*image
);
38 void radeonMapTexture(GLcontext
*ctx
, struct gl_texture_object
*texObj
);
39 void radeonUnmapTexture(GLcontext
*ctx
, struct gl_texture_object
*texObj
);
40 void radeonGenerateMipmap(GLcontext
* ctx
, GLenum target
, struct gl_texture_object
*texObj
);
41 int radeon_validate_texture_miptree(GLcontext
* ctx
, struct gl_texture_object
*texObj
);
42 GLuint
radeon_face_for_target(GLenum target
);
43 const struct gl_texture_format
*radeonChooseTextureFormat(GLcontext
* ctx
,
48 void radeonTexImage1D(GLcontext
* ctx
, GLenum target
, GLint level
,
50 GLint width
, GLint border
,
51 GLenum format
, GLenum type
, const GLvoid
* pixels
,
52 const struct gl_pixelstore_attrib
*packing
,
53 struct gl_texture_object
*texObj
,
54 struct gl_texture_image
*texImage
);
55 void radeonTexImage2D(GLcontext
* ctx
, GLenum target
, GLint level
,
57 GLint width
, GLint height
, GLint border
,
58 GLenum format
, GLenum type
, const GLvoid
* pixels
,
59 const struct gl_pixelstore_attrib
*packing
,
60 struct gl_texture_object
*texObj
,
61 struct gl_texture_image
*texImage
);
62 void radeonCompressedTexImage2D(GLcontext
* ctx
, GLenum target
,
63 GLint level
, GLint internalFormat
,
64 GLint width
, GLint height
, GLint border
,
65 GLsizei imageSize
, const GLvoid
* data
,
66 struct gl_texture_object
*texObj
,
67 struct gl_texture_image
*texImage
);
68 void radeonTexImage3D(GLcontext
* ctx
, GLenum target
, GLint level
,
70 GLint width
, GLint height
, GLint depth
,
72 GLenum format
, GLenum type
, const GLvoid
* pixels
,
73 const struct gl_pixelstore_attrib
*packing
,
74 struct gl_texture_object
*texObj
,
75 struct gl_texture_image
*texImage
);
76 void radeonTexSubImage1D(GLcontext
* ctx
, GLenum target
, GLint level
,
79 GLenum format
, GLenum type
,
80 const GLvoid
* pixels
,
81 const struct gl_pixelstore_attrib
*packing
,
82 struct gl_texture_object
*texObj
,
83 struct gl_texture_image
*texImage
);
84 void radeonTexSubImage2D(GLcontext
* ctx
, GLenum target
, GLint level
,
85 GLint xoffset
, GLint yoffset
,
86 GLsizei width
, GLsizei height
,
87 GLenum format
, GLenum type
,
88 const GLvoid
* pixels
,
89 const struct gl_pixelstore_attrib
*packing
,
90 struct gl_texture_object
*texObj
,
91 struct gl_texture_image
*texImage
);
92 void radeonCompressedTexSubImage2D(GLcontext
* ctx
, GLenum target
,
93 GLint level
, GLint xoffset
,
94 GLint yoffset
, GLsizei width
,
95 GLsizei height
, GLenum format
,
96 GLsizei imageSize
, const GLvoid
* data
,
97 struct gl_texture_object
*texObj
,
98 struct gl_texture_image
*texImage
);
100 void radeonTexSubImage3D(GLcontext
* ctx
, GLenum target
, GLint level
,
101 GLint xoffset
, GLint yoffset
, GLint zoffset
,
102 GLsizei width
, GLsizei height
, GLsizei depth
,
103 GLenum format
, GLenum type
,
104 const GLvoid
* pixels
,
105 const struct gl_pixelstore_attrib
*packing
,
106 struct gl_texture_object
*texObj
,
107 struct gl_texture_image
*texImage
);