rdi_make: allow duplicates in bake name map insertions - they become extremely costly to check for, and we don't produce them anyways...

This commit is contained in:
Ryan Fleury
2026-06-24 07:20:06 -06:00
parent 1901e67f39
commit 6b841d9959
-17
View File
@@ -1807,29 +1807,12 @@ rdim_bake_name_map_insert(RDIM_Arena *arena, RDIM_BakeNameMapTopology *map_topol
{
slot = map->slots[slot_idx] = rdim_push_array(arena, RDIM_BakeNameChunkList, 1);
}
RDI_S32 is_duplicate = 0;
for(RDIM_BakeNameChunkNode *n = slot->first; n != 0; n = n->next)
{
for(RDI_U64 n_idx = 0; n_idx < n->count; n_idx += 1)
{
if(rdim_str8_match(n->v[n_idx].string, string, 0) &&
n->v[n_idx].idx == idx)
{
is_duplicate = 1;
goto break_all;
}
}
}
break_all:;
if(!is_duplicate)
{
RDIM_BakeName *bstr = rdim_bake_name_chunk_list_push(arena, slot, chunk_cap);
bstr->string = string;
bstr->idx = idx;
bstr->hash = hash;
}
}
}
////////////////////////////////
//~ rjf: [Baking Helpers] Deduplicated Path Baking Tree