winsys/amdgpu: use only one fence per BO
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 7 Sep 2016 08:50:14 +0000 (10:50 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Sep 2016 11:54:59 +0000 (13:54 +0200)
commit11cbf4d7aea861e37067407ba7a660ea566c1593
tree20eddeb7982c07dcde7ce6a40fafc8b4065a1cd1
parent480ac143df281fef762e30f92bccc3b89674fef8
winsys/amdgpu: use only one fence per BO

The fence that is added to the BO during flush is guaranteed to be
signaled after all the fences that were in the fences array of the BO
before the flush, because those fences are added as dependencies for the
submission (and all this happens atomically under the bo_fence_lock).

Therefore, keeping only the last fence around is sufficient.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_bo.h
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c