Mesa (master): Revert "radv: fallback to an in-memory cache when no pipline cache is provided"
Dave Airlie
airlied at kemper.freedesktop.org
Mon Mar 20 03:41:56 UTC 2017
Module: Mesa
Branch: master
Commit: 10c2b588c4bba94b329585734bfbdcd63accde90
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=10c2b588c4bba94b329585734bfbdcd63accde90
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Mar 20 13:24:02 2017 +1000
Revert "radv: fallback to an in-memory cache when no pipline cache is provided"
This reverts commit 2845a108a9a8bd4b0e6e9b590c976452fb99eb10.
This break VK-GL-CTS randomly.
./deqp-vk --deqp-case=dEQP-VK.texture.filtering.3d.formats.r4g4b4a4*
bounces around here from 6/6 to 3/6 or 4/6 to hanging.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_pipeline.c | 9 +++------
src/amd/vulkan/radv_pipeline_cache.c | 7 ++-----
src/amd/vulkan/radv_private.h | 3 +--
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 0eeb53592c..094d636fc5 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -564,8 +564,7 @@ radv_pipeline_compile(struct radv_pipeline *pipeline,
if (pipeline->gs_copy_shader) {
pipeline->gs_copy_shader =
- radv_pipeline_cache_insert_shader(pipeline->device,
- cache,
+ radv_pipeline_cache_insert_shader(cache,
gs_copy_sha1,
pipeline->gs_copy_shader,
gs_copy_code,
@@ -576,10 +575,8 @@ radv_pipeline_compile(struct radv_pipeline *pipeline,
ralloc_free(nir);
if (variant)
- variant = radv_pipeline_cache_insert_shader(pipeline->device,
- cache, sha1,
- variant, code,
- code_size);
+ variant = radv_pipeline_cache_insert_shader(cache, sha1, variant,
+ code, code_size);
if (code)
free(code);
diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
index 1fb8450021..5f6355f0d1 100644
--- a/src/amd/vulkan/radv_pipeline_cache.c
+++ b/src/amd/vulkan/radv_pipeline_cache.c
@@ -156,8 +156,6 @@ radv_create_shader_variant_from_pipeline_cache(struct radv_device *device,
if (cache)
entry = radv_pipeline_cache_search(cache, sha1);
- else
- entry = radv_pipeline_cache_search(device->mem_cache, sha1);
if (!entry)
return NULL;
@@ -260,14 +258,13 @@ radv_pipeline_cache_add_entry(struct radv_pipeline_cache *cache,
}
struct radv_shader_variant *
-radv_pipeline_cache_insert_shader(struct radv_device *device,
- struct radv_pipeline_cache *cache,
+radv_pipeline_cache_insert_shader(struct radv_pipeline_cache *cache,
const unsigned char *sha1,
struct radv_shader_variant *variant,
const void *code, unsigned code_size)
{
if (!cache)
- cache = device->mem_cache;
+ return variant;
pthread_mutex_lock(&cache->mutex);
struct cache_entry *entry = radv_pipeline_cache_search_unlocked(cache, sha1);
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index fd4edf665f..e4654bb4d4 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -316,8 +316,7 @@ radv_create_shader_variant_from_pipeline_cache(struct radv_device *device,
const unsigned char *sha1);
struct radv_shader_variant *
-radv_pipeline_cache_insert_shader(struct radv_device *device,
- struct radv_pipeline_cache *cache,
+radv_pipeline_cache_insert_shader(struct radv_pipeline_cache *cache,
const unsigned char *sha1,
struct radv_shader_variant *variant,
const void *code, unsigned code_size);
More information about the mesa-commit
mailing list