turnip: enable 420_UNORM formats
[mesa.git] / src / freedreno / vulkan / tu_pipeline_cache.c
index b8b2ceda263f4f4e8234e849a95ad0851f25b642..47a8b97283fba40a4067fad975b350c265d6f435 100644 (file)
@@ -43,7 +43,7 @@ struct cache_entry
    char code[0];
 };
 
-void
+static void
 tu_pipeline_cache_init(struct tu_pipeline_cache *cache,
                        struct tu_device *device)
 {
@@ -66,7 +66,7 @@ tu_pipeline_cache_init(struct tu_pipeline_cache *cache,
       memset(cache->hash_table, 0, byte_size);
 }
 
-void
+static void
 tu_pipeline_cache_finish(struct tu_pipeline_cache *cache)
 {
    for (unsigned i = 0; i < cache->table_size; ++i)
@@ -88,41 +88,6 @@ entry_size(struct cache_entry *entry)
    return ret;
 }
 
-void
-tu_hash_shaders(unsigned char *hash,
-                const VkPipelineShaderStageCreateInfo **stages,
-                const struct tu_pipeline_layout *layout,
-                const struct tu_pipeline_key *key,
-                uint32_t flags)
-{
-   struct mesa_sha1 ctx;
-
-   _mesa_sha1_init(&ctx);
-   if (key)
-      _mesa_sha1_update(&ctx, key, sizeof(*key));
-   if (layout)
-      _mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1));
-
-   for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
-      if (stages[i]) {
-         TU_FROM_HANDLE(tu_shader_module, module, stages[i]->module);
-         const VkSpecializationInfo *spec_info =
-            stages[i]->pSpecializationInfo;
-
-         _mesa_sha1_update(&ctx, module->sha1, sizeof(module->sha1));
-         _mesa_sha1_update(&ctx, stages[i]->pName, strlen(stages[i]->pName));
-         if (spec_info) {
-            _mesa_sha1_update(
-               &ctx, spec_info->pMapEntries,
-               spec_info->mapEntryCount * sizeof spec_info->pMapEntries[0]);
-            _mesa_sha1_update(&ctx, spec_info->pData, spec_info->dataSize);
-         }
-      }
-   }
-   _mesa_sha1_update(&ctx, &flags, 4);
-   _mesa_sha1_final(&ctx, hash);
-}
-
 static struct cache_entry *
 tu_pipeline_cache_search_unlocked(struct tu_pipeline_cache *cache,
                                   const unsigned char *sha1)
@@ -240,7 +205,7 @@ struct cache_header
    uint8_t uuid[VK_UUID_SIZE];
 };
 
-void
+static void
 tu_pipeline_cache_load(struct tu_pipeline_cache *cache,
                        const void *data,
                        size_t size)