summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Smith <[email protected]>2017-10-23 10:37:42 +0100
committerBas Nieuwenhuizen <[email protected]>2017-10-23 22:36:54 +0200
commitfee9d05e2136b2b7c5a1ad2be7180b99f733f539 (patch)
tree965cfb016ade66f4271ffb868df50c9c516aa3a9
parent013d33122028f2492da90a03ae4bc1dab84c3ee9 (diff)
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 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> CC: 17.3 <[email protected]>
-rw-r--r--src/amd/vulkan/radv_pipeline_cache.c2
1 files changed, 2 insertions, 0 deletions
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];
}
}