mesa: Separate PBO validation checks from buffer mapping, to allow reuse
authorEduardo Lima Mitev <elima@igalia.com>
Thu, 12 Mar 2015 07:14:03 +0000 (08:14 +0100)
committerEduardo Lima Mitev <elima@igalia.com>
Fri, 13 Mar 2015 15:40:20 +0000 (16:40 +0100)
commit7c084752c612c1763212830618ee0a86f4edf8f6
tree250fb290eed50b83c67b69dab2efdb04a2d40818
parent7b5bb97cefbf1d0cfef28bc974ee9a68024e3b45
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 <laura@jlekstrand.net>
src/mesa/main/pbo.c
src/mesa/main/pbo.h