mesa/main: bail earlier for size == 0 in _mesa_clear_buffer_sub_data
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Jan 2016 22:57:49 +0000 (17:57 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 3 Feb 2016 13:03:46 +0000 (14:03 +0100)
commit46b7a526f551e18a20d07220663652ba011e4fe6
tree783b4c0aa58b16f055c3218d7a267ecc2a35e4d6
parentfd7229b4374d7bd8f296e1da4123e0d678d67699
mesa/main: bail earlier for size == 0 in _mesa_clear_buffer_sub_data

Note that the conversion of the clear data (when data != NULL) can fail due
to an out of memory condition, but it does not check any error conditions
mandated by the spec. Therefore, it is safe to skip when size == 0.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/bufferobj.c