mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
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>
This commit is contained in:
parent
70f89dd75e
commit
2655265fcb
1 changed files with 1 additions and 1 deletions
|
|
@ -696,7 +696,7 @@ valid_draw_indirect(struct gl_context *ctx,
|
|||
GLenum mode, const GLvoid *indirect,
|
||||
GLsizei size, const char *name)
|
||||
{
|
||||
const GLsizeiptr end = (GLsizeiptr)indirect + size;
|
||||
const uint64_t end = (uint64_t) (uintptr_t) indirect + size;
|
||||
|
||||
/* OpenGL ES 3.1 spec. section 10.5:
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue