Mesa (master): radv: Fix disk_cache_get size argument.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 31 10:58:05 UTC 2019


Module: Mesa
Branch: master
Commit: 6ced684e2743dec5b6db397fc45e464abf21b5e3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ced684e2743dec5b6db397fc45e464abf21b5e3

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Wed Oct 30 15:00:39 2019 +0100

radv: Fix disk_cache_get size argument.

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 at itsqueeze.com>

---

 src/amd/vulkan/radv_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 55a5d2a3c53..544237062a3 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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);




More information about the mesa-commit mailing list