winsys/amdgpu: fix VDPAU interop by having one amdgpu_winsys_bo per BO (v2)
authorMarek Olšák <marek.olsak@amd.com>
Mon, 16 Jul 2018 17:11:29 +0000 (13:11 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 18 Jul 2018 15:56:28 +0000 (11:56 -0400)
commit51d6b163da1faa01e95cfd2f3493a843285a7ce9
tree13e92a8dbcbbd9a7123be04f93f48f847a22e856
parente06b8ec106e64880a56d1cb990836ec3ad6536e6
winsys/amdgpu: fix VDPAU interop by having one amdgpu_winsys_bo per BO (v2)

Dependencies between rings are inserted correctly if a buffer is
represented by only one unique amdgpu_winsys_bo instance.
Use a hash table keyed by amdgpu_bo_handle to have exactly one
amdgpu_winsys_bo per amdgpu_bo_handle.

v2: return offset and stride properly

Tested-by: Leo Liu <leo.liu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h