i965/sync: Fail sync creation when batchbuffer flush fails
authorChad Versace <chadversary@chromium.org>
Fri, 13 Jan 2017 18:46:49 +0000 (10:46 -0800)
committerChad Versace <chadversary@chromium.org>
Fri, 27 Jan 2017 21:10:07 +0000 (13:10 -0800)
commita5c17f5c29c14e7fc989f2555f1f7e32f07d6bf3
treea9c2f42ea8de523cb94b2af8f905570c7631863d
parent014d0e0f88a8c4201e16db9428758d7119cee021
i965/sync: Fail sync creation when batchbuffer flush fails

Pre-patch, brw_sync.c ignored the return value of
intel_batchbuffer_flush().

When intel_batchbuffer_flush() fails during eglCreateSync
(brw_dri_create_fence), we now give up, cleanup, and return NULL.

When it fails during glFenceSync, however, we blindly continue and hope
for the best because there does not exist yet a way to tell core GL that
sync creation failed.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_sync.c