radv: Fix disk_cache_get size argument.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 30 Oct 2019 14:00:39 +0000 (15:00 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 31 Oct 2019 10:40:43 +0000 (11:40 +0100)
Got some int->pointer warnings and 20 is not a valid pointer ....

Fixes: 2e3a635ee69 "radv: Add an early exit in the secure compile if we already have the cache entries."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/amd/vulkan/radv_pipeline.c

index 55a5d2a3c53ea9ded31487697e4316aaf5059da7..544237062a313471413e675976331d9f4836f767 100644 (file)
@@ -4646,10 +4646,10 @@ radv_secure_compile(struct radv_pipeline *pipeline,
 
        /* Do an early exit if all cache entries are already there. */
        bool may_need_copy_shader = pStages[MESA_SHADER_GEOMETRY];
-       void *main_entry = disk_cache_get(device->physical_device->disk_cache, allowed_hashes[0], 20);
+       void *main_entry = disk_cache_get(device->physical_device->disk_cache, allowed_hashes[0], NULL);
        void *copy_entry = NULL;
        if (may_need_copy_shader)
-               copy_entry = disk_cache_get(device->physical_device->disk_cache, allowed_hashes[1], 20);
+               copy_entry = disk_cache_get(device->physical_device->disk_cache, allowed_hashes[1], NULL);
 
        bool has_all_cache_entries = main_entry && (!may_need_copy_shader || copy_entry);
        free(main_entry);