[Mesa-dev] [PATCH] radv: Update code pointer correctly if a variant is already created
Alex Smith
asmith at feralinteractive.com
Mon Oct 23 09:37:42 UTC 2017
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 at feralinteractive.com>
---
src/amd/vulkan/radv_pipeline_cache.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
index a75356b822..9ba9a3b61b 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];
}
}
--
2.13.6
More information about the mesa-dev
mailing list