From f494baf976c4494dd0ea4e755907cf49b026eb5d Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 1 Nov 2025 14:22:34 -0700 Subject: Better hashing of shaders --- src/core/core_impl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/core_impl.h') diff --git a/src/core/core_impl.h b/src/core/core_impl.h index eefdfbe..320532d 100644 --- a/src/core/core_impl.h +++ b/src/core/core_impl.h @@ -15,16 +15,18 @@ #include +typedef uint32_t hash_t; + // TODO: Make a generic (hash, void*) structure and define functions over it. // Then define a macro that defines type-safe macros given the type of the // entry. typedef struct ShaderCacheEntry { - uint64_t hash; - Shader* shader; + hash_t hash; + Shader* shader; } ShaderCacheEntry; typedef struct ShaderProgramCacheEntry { - uint64_t hash; + hash_t hash; ShaderProgram* program; } ShaderProgramCacheEntry; -- cgit v1.2.3