radv: reduce CPU overhead merging bo lists.
authorDave Airlie <airlied@redhat.com>
Fri, 10 Feb 2017 00:58:59 +0000 (00:58 +0000)
committerDave Airlie <airlied@redhat.com>
Sun, 12 Feb 2017 19:00:19 +0000 (19:00 +0000)
commitf466d4dd6af76c3e3edef403c542180094009fc3
tree76ad1aa01e89135548774ea213fae08f234ad454
parent48f04862c1d74844db9534b32ef73e5a2bc0ae74
radv: reduce CPU overhead merging bo lists.

Just noticed we do a fair bit of unneeded searching here.

Since we know that the buffers in a CS are unique already,
the first time we get any buffers, we can just memcpy those into
place, and when we are searching for subsequent CSes, we only
have to search up until where the previous unique buffers were.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c