About Social Code
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaith Ekstrand <faith.ekstrand@collabora.com>2025-10-24 11:39:14 -0400
committerFaith Ekstrand <faith.ekstrand@collabora.com>2025-11-06 11:33:55 -0500
commitacd00c07f68aea0f5ab4641f4749c8f49b8927b0 (patch)
tree44d828f96b0d7fd87ddc4bfd674d9a8f12e2f403
parentbbe6fff67760e70265998b68385ccb43377cedc9 (diff)
panvk: Initialize the disk cache earlier
We want to know whether or not we successfully initialized before filling out physical device properties. Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38284>
-rw-r--r--src/panfrost/vulkan/panvk_physical_device.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c
index 48d783123b3..7745d6d3ef7 100644
--- a/src/panfrost/vulkan/panvk_physical_device.c
+++ b/src/panfrost/vulkan/panvk_physical_device.c
@@ -136,8 +136,8 @@ get_drm_device_ids(struct panvk_physical_device *device,
}
static void
-get_cache_sha1(struct panvk_physical_device *device,
- const struct panvk_instance *instance)
+init_shader_caches(struct panvk_physical_device *device,
+ const struct panvk_instance *instance)
{
struct mesa_sha1 sha_ctx;
_mesa_sha1_init(&sha_ctx);
@@ -153,12 +153,7 @@ get_cache_sha1(struct panvk_physical_device *device,
STATIC_ASSERT(VK_UUID_SIZE <= SHA1_DIGEST_LENGTH);
memcpy(device->cache_uuid, sha, VK_UUID_SIZE);
-}
-static void
-init_disk_cache(struct panvk_physical_device *device,
- const struct panvk_instance *instance)
-{
#ifdef ENABLE_SHADER_CACHE
char renderer[17];
ASSERTED int len = snprintf(renderer, sizeof(renderer), "panvk_0x%08x",
@@ -336,7 +331,7 @@ panvk_physical_device_init(struct panvk_physical_device *device,
memset(device->name, 0, sizeof(device->name));
sprintf(device->name, "%s", device->model->name);
- get_cache_sha1(device, instance);
+ init_shader_caches(device, instance);
result = get_core_masks(device, instance);
if (result != VK_SUCCESS)
@@ -383,8 +378,6 @@ panvk_physical_device_init(struct panvk_physical_device *device,
device->vk.supported_sync_types = device->sync_types;
- init_disk_cache(device, instance);
-
result = panvk_wsi_init(device);
if (result != VK_SUCCESS)
goto fail;