radv: Update code pointer correctly if a variant is already created
authorAlex Smith <asmith@feralinteractive.com>
Mon, 23 Oct 2017 09:37:42 +0000 (10:37 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 23 Oct 2017 20:36:54 +0000 (22:36 +0200)
commitfee9d05e2136b2b7c5a1ad2be7180b99f733f539
tree965cfb016ade66f4271ffb868df50c9c516aa3a9
parent013d33122028f2492da90a03ae4bc1dab84c3ee9
radv: Update code pointer correctly if a variant is already created

This was the actual cause of GPU hangs fixed by 0fdd531457ec ("radv:
Fix pipeline cache locking issues"), since multiple threads would end
up trying to create the variants for a single entry.

Now that we're locking around the whole of this function, this isn't
really necessary (we either create all or none of the variants), but
fix this anyway in case things change later.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: 17.3 <mesa-stable@lists.freedesktop.org>
src/amd/vulkan/radv_pipeline_cache.c