X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fpbo.h;h=bc764175ff4a1392eb1872b822805d7bc731ff3e;hb=095515e16ca3cb2c9f1813b6602ee57ae28325a8;hp=0cddd72ba7f6c3a863270eb91cd844980516d1ca;hpb=0eccb1038a620bc76ba45ac00c293b3e88427510;p=mesa.git diff --git a/src/mesa/main/pbo.h b/src/mesa/main/pbo.h index 0cddd72ba7f..bc764175ff4 100644 --- a/src/mesa/main/pbo.h +++ b/src/mesa/main/pbo.h @@ -17,9 +17,10 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ @@ -27,14 +28,17 @@ #define PBO_H -#include "mtypes.h" +#include "glheader.h" +struct gl_context; +struct gl_pixelstore_attrib; extern GLboolean _mesa_validate_pbo_access(GLuint dimensions, const struct gl_pixelstore_attrib *pack, GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *ptr); + GLenum format, GLenum type, GLsizei clientMemSize, + const GLvoid *ptr); extern const GLvoid * _mesa_map_pbo_source(struct gl_context *ctx, @@ -46,8 +50,8 @@ _mesa_map_validate_pbo_source(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *ptr, - const char *where); + GLenum format, GLenum type, GLsizei clientMemSize, + const GLvoid *ptr, const char *where); extern void _mesa_unmap_pbo_source(struct gl_context *ctx, @@ -63,8 +67,8 @@ _mesa_map_validate_pbo_dest(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, GLvoid *ptr, - const char *where); + GLenum format, GLenum type, GLsizei clientMemSize, + GLvoid *ptr, const char *where); extern void _mesa_unmap_pbo_dest(struct gl_context *ctx, @@ -80,7 +84,8 @@ _mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions, extern const GLvoid * _mesa_validate_pbo_compressed_teximage(struct gl_context *ctx, - GLsizei imageSize, const GLvoid *pixels, + GLuint dimensions, GLsizei imageSize, + const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, const char *funcName); @@ -89,4 +94,18 @@ _mesa_unmap_teximage_pbo(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack); +extern bool +_mesa_validate_pbo_source(struct gl_context *ctx, GLuint dimensions, + const struct gl_pixelstore_attrib *unpack, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, + GLsizei clientMemSize, + const GLvoid *ptr, const char *where); + +extern bool +_mesa_validate_pbo_source_compressed(struct gl_context *ctx, GLuint dimensions, + const struct gl_pixelstore_attrib *unpack, + GLsizei imageSize, const GLvoid *ptr, + const char *where); + #endif