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@redhat.com>
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,
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);
if (cache)
entry = radv_pipeline_cache_search(cache, sha1);
- else
- entry = radv_pipeline_cache_search(device->mem_cache, sha1);
if (!entry)
return NULL;
}
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);
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);