summaryrefslogtreecommitdiff
path: root/qstd/str.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-26 16:11:33 +1100
committerquou <quou@disroot.org>2024-12-26 16:12:02 +1100
commitb2ece42822225fd67a1286a2ef51f7b76c634255 (patch)
tree6256a55abb9dbda2b6a2e8da973033a3aab4c321 /qstd/str.c
parent32e3b7e01a6a0a9c433966f5fe77066e389fade6 (diff)
seperate descriptor sets from pipelines to allow swapping out shader resources without recreating pipelines
Diffstat (limited to 'qstd/str.c')
-rw-r--r--qstd/str.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/qstd/str.c b/qstd/str.c
index 49ad396..2c74d4b 100644
--- a/qstd/str.c
+++ b/qstd/str.c
@@ -11,6 +11,15 @@ uint64_t fnv1a64(uint8_t* buf, size_t size) {
return hash;
}
+uint64_t fnv1a64_2(uint64_t hash, uint8_t* buf, size_t size) {
+ size_t i;
+ for (i = 0; i < size; i++, buf++) {
+ hash ^= *buf;
+ hash *= 0x100000001b3;
+ }
+ return hash;
+}
+
uint32_t hash_string(const char* s) {
uint32_t h = 2166136261u;
for (; *s; s++) {