mesa: Fix indirect draw buffer size check on 32-bit systems.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 26 Apr 2016 05:34:37 +0000 (22:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 28 Apr 2016 23:31:45 +0000 (16:31 -0700)
commit2655265fcba9017e793026c76e490e04db088c8f
tree44a3b61748fdc616e571efefea31e3bb0bbf5785
parent70f89dd75ee7487d0143fa871bb20cbd29f54da0
mesa: Fix indirect draw buffer size check on 32-bit systems.

Fixes dEQP-GLES31.functional subtests:
draw_indirect.negative.command_offset_not_in_buffer_signed32_wrap
draw_indirect.negative.command_offset_not_in_buffer_unsigned32_wrap

These tests use really large values that overflow GLsizeiptr, at
which point the buffer size isn't less than "end".

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95138
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
src/mesa/main/api_validate.c