diff options
author | Eduardo Lima Mitev <[email protected]> | 2015-03-12 08:14:03 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2015-03-13 16:40:20 +0100 |
commit | 7c084752c612c1763212830618ee0a86f4edf8f6 (patch) | |
tree | 250fb290eed50b83c67b69dab2efdb04a2d40818 /src/mesa/main/pbo.h | |
parent | 7b5bb97cefbf1d0cfef28bc974ee9a68024e3b45 (diff) |
mesa: Separate PBO validation checks from buffer mapping, to allow reuse
Internal PBO functions such as _mesa_map_validate_pbo_source() and
_mesa_validate_pbo_compressed_teximage() perform validation and buffer mapping
within the same call.
This patch takes out the validation into separate functions to allow reuse
of functionality by other code (i.e, gl(Compressed)Tex(Sub)Image).
Reviewed-by: Laura Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main/pbo.h')
-rw-r--r-- | src/mesa/main/pbo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/pbo.h b/src/mesa/main/pbo.h index 9851ef1a172..b3f24e62bd2 100644 --- a/src/mesa/main/pbo.h +++ b/src/mesa/main/pbo.h @@ -92,4 +92,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 |