aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_impl.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-11-01 14:22:34 -0700
committer3gg <3gg@shellblade.net>2025-11-01 14:22:34 -0700
commitf494baf976c4494dd0ea4e755907cf49b026eb5d (patch)
tree3df754e78b711e56cb5e4b775f2caa803ba93b0c /src/core/core_impl.h
parentf2bac7f22ee0314edee5bee90d62d79afbd68171 (diff)
Better hashing of shaders
Diffstat (limited to 'src/core/core_impl.h')
-rw-r--r--src/core/core_impl.h8
1 files changed, 5 insertions, 3 deletions
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 @@
15 15
16#include <stdint.h> 16#include <stdint.h>
17 17
18typedef uint32_t hash_t;
19
18// TODO: Make a generic (hash, void*) structure and define functions over it. 20// TODO: Make a generic (hash, void*) structure and define functions over it.
19// Then define a macro that defines type-safe macros given the type of the 21// Then define a macro that defines type-safe macros given the type of the
20// entry. 22// entry.
21typedef struct ShaderCacheEntry { 23typedef struct ShaderCacheEntry {
22 uint64_t hash; 24 hash_t hash;
23 Shader* shader; 25 Shader* shader;
24} ShaderCacheEntry; 26} ShaderCacheEntry;
25 27
26typedef struct ShaderProgramCacheEntry { 28typedef struct ShaderProgramCacheEntry {
27 uint64_t hash; 29 hash_t hash;
28 ShaderProgram* program; 30 ShaderProgram* program;
29} ShaderProgramCacheEntry; 31} ShaderProgramCacheEntry;
30 32