diff options
author | Alex Smith <[email protected]> | 2017-10-23 10:37:42 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-10-23 22:36:54 +0200 |
commit | fee9d05e2136b2b7c5a1ad2be7180b99f733f539 (patch) | |
tree | 965cfb016ade66f4271ffb868df50c9c516aa3a9 /src | |
parent | 013d33122028f2492da90a03ae4bc1dab84c3ee9 (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]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_pipeline_cache.c | 2 |
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]; } } |