From fee9d05e2136b2b7c5a1ad2be7180b99f733f539 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Mon, 23 Oct 2017 10:37:42 +0100 Subject: 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 Reviewed-by: Bas Nieuwenhuizen CC: 17.3 --- src/amd/vulkan/radv_pipeline_cache.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/amd') diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index a75356b8229..9ba9a3b61ba 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -231,6 +231,8 @@ radv_create_shader_variants_from_pipeline_cache(struct radv_device *device, p += entry->code_sizes[i]; entry->variants[i] = variant; + } else if (entry->code_sizes[i]) { + p += sizeof(struct cache_entry_variant_info) + entry->code_sizes[i]; } } -- cgit v1.2.3