2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
5 * Copyright (C) 2009-2011 VMware, Inc. 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 * 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.
34 struct gl_pixelstore_attrib
;
37 _mesa_validate_pbo_access(GLuint dimensions
,
38 const struct gl_pixelstore_attrib
*pack
,
39 GLsizei width
, GLsizei height
, GLsizei depth
,
40 GLenum format
, GLenum type
, GLsizei clientMemSize
,
44 _mesa_map_pbo_source(struct gl_context
*ctx
,
45 const struct gl_pixelstore_attrib
*unpack
,
49 _mesa_map_validate_pbo_source(struct gl_context
*ctx
,
51 const struct gl_pixelstore_attrib
*unpack
,
52 GLsizei width
, GLsizei height
, GLsizei depth
,
53 GLenum format
, GLenum type
, GLsizei clientMemSize
,
54 const GLvoid
*ptr
, const char *where
);
57 _mesa_unmap_pbo_source(struct gl_context
*ctx
,
58 const struct gl_pixelstore_attrib
*unpack
);
61 _mesa_map_pbo_dest(struct gl_context
*ctx
,
62 const struct gl_pixelstore_attrib
*pack
,
66 _mesa_map_validate_pbo_dest(struct gl_context
*ctx
,
68 const struct gl_pixelstore_attrib
*unpack
,
69 GLsizei width
, GLsizei height
, GLsizei depth
,
70 GLenum format
, GLenum type
, GLsizei clientMemSize
,
71 GLvoid
*ptr
, const char *where
);
74 _mesa_unmap_pbo_dest(struct gl_context
*ctx
,
75 const struct gl_pixelstore_attrib
*pack
);
79 _mesa_validate_pbo_teximage(struct gl_context
*ctx
, GLuint dimensions
,
80 GLsizei width
, GLsizei height
, GLsizei depth
,
81 GLenum format
, GLenum type
, const GLvoid
*pixels
,
82 const struct gl_pixelstore_attrib
*unpack
,
83 const char *funcName
);
86 _mesa_validate_pbo_compressed_teximage(struct gl_context
*ctx
,
87 GLuint dimensions
, GLsizei imageSize
,
89 const struct gl_pixelstore_attrib
*packing
,
90 const char *funcName
);
93 _mesa_unmap_teximage_pbo(struct gl_context
*ctx
,
94 const struct gl_pixelstore_attrib
*unpack
);
98 _mesa_validate_pbo_source(struct gl_context
*ctx
, GLuint dimensions
,
99 const struct gl_pixelstore_attrib
*unpack
,
100 GLsizei width
, GLsizei height
, GLsizei depth
,
101 GLenum format
, GLenum type
,
102 GLsizei clientMemSize
,
103 const GLvoid
*ptr
, const char *where
);
106 _mesa_validate_pbo_source_compressed(struct gl_context
*ctx
, GLuint dimensions
,
107 const struct gl_pixelstore_attrib
*unpack
,
108 GLsizei imageSize
, const GLvoid
*ptr
,