v3d: Fix incorrect handling of two fences created back-to-back.
authorEric Anholt <eric@anholt.net>
Mon, 9 Jul 2018 19:41:46 +0000 (12:41 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 20 Jul 2018 18:11:29 +0000 (11:11 -0700)
commita221f9709efeaf0ac901c7b0568e8aa311aa1b96
tree2a63be1670bbca761fbc141936eb86afeb05ddde
parentfc28692a5af22754818e2eda20409f9502daa088
v3d: Fix incorrect handling of two fences created back-to-back.

Recreating our context's syncobj with ALREADY_SIGNALED meant that if you
created two fences in a row, then waiting on the second would succeed
immediately.  Instead, export a sync file in the gallium fence (since we
don't have a syncobj clone ioctl), and just create a new syncobj to wait
on whenever we need to.

Noticed while debugging
dEQP-GLES3.functional.fence_sync.client_wait_sync_finish
src/gallium/drivers/v3d/v3d_fence.c