winsys/radeon: add fine-grained fences for slab buffers
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Sep 2016 09:46:12 +0000 (11:46 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 27 Sep 2016 14:45:34 +0000 (16:45 +0200)
commita1e391e39df2b1d8169e773a30153167ab8e13e8
tree0c203d55ab010cdacfe7548b11d5c583d4494643
parent0edebde9a48ab609c636050208505885da363593
winsys/radeon: add fine-grained fences for slab buffers

Note the logic for adding fences is somewhat different than for amdgpu,
because radeon has no scheduler and we therefore have no guarantee about
the order in which submissions from multiple threads are processed.

(Ironically, this is only an issue when "multi-threaded submission" is
disabled, because "multi-threaded submission" actually means that all
submissions happen from a single thread that happens to be separate from
the application's threads. If we only supported "multi-threaded
submission", the fence handling could be simplified by adding the fences
in that thread where everything is serialized.)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.h
src/gallium/winsys/radeon/drm/radeon_drm_cs.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.h