[Mesa-dev] [PATCH] util/disk_cache: remove function stubs

Timothy Arceri tarceri at itsqueeze.com
Fri Feb 10 01:38:43 UTC 2017


The option to disable shader cache was removed from the build options
when we imported a sha1 implementation into Mesa.

Cc: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/util/disk_cache.h | 50 --------------------------------------------------
 1 file changed, 50 deletions(-)

diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
index e429db5..4ff1da5 100644
--- a/src/util/disk_cache.h
+++ b/src/util/disk_cache.h
@@ -38,10 +38,6 @@ typedef uint8_t cache_key[CACHE_KEY_SIZE];
 
 struct disk_cache;
 
-/* Provide inlined stub functions if the shader cache is disabled. */
-
-#ifdef ENABLE_SHADER_CACHE
-
 /**
  * Create a new cache object.
  *
@@ -137,52 +133,6 @@ disk_cache_put_key(struct disk_cache *cache, cache_key key);
 bool
 disk_cache_has_key(struct disk_cache *cache, cache_key key);
 
-#else
-
-static inline struct disk_cache *
-disk_cache_create(const char *gpu_name, const char *mesa_version)
-{
-   return NULL;
-}
-
-static inline void
-disk_cache_destroy(struct disk_cache *cache) {
-   return;
-}
-
-static inline void
-disk_cache_put(struct disk_cache *cache, cache_key key,
-          const void *data, size_t size)
-{
-   return;
-}
-
-static inline void
-disk_cache_remove(struct program_cache *cache, cache_key key)
-{
-   return;
-}
-
-static inline uint8_t *
-disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size)
-{
-   return NULL;
-}
-
-static inline void
-disk_cache_put_key(struct disk_cache *cache, cache_key key)
-{
-   return;
-}
-
-static inline bool
-disk_cache_has_key(struct disk_cache *cache, cache_key key)
-{
-   return false;
-}
-
-#endif /* ENABLE_SHADER_CACHE */
-
 #ifdef __cplusplus
 }
 #endif
-- 
2.9.3



More information about the mesa-dev mailing list