virgl: don't flush an empty range
authorGurchetan Singh <gurchetansingh@chromium.org>
Fri, 28 Dec 2018 23:07:25 +0000 (00:07 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 3 Jan 2019 19:59:29 +0000 (20:59 +0100)
commitca66457b0516ef8af5ef17c54460ab8d9aefc5fa
treed44d518f38eeea061c459f4cc1149e565709efea
parent393a756e6af69be8d7f5bcb64eeaad02a63c33c7
virgl: don't flush an empty range

Otherwise, the gl-1.0-long-dlist Piglit test crashes.

Fixes: db7757 ("virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT")
Reported by airlied@

v2: Exit on any invalid range (Erik)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109190
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
src/gallium/drivers/virgl/virgl_buffer.c