I have some code where I'm doing:
const source: VertexAttributeSource = if (is_builtin)
std.meta.stringToEnum(VertexAttributeSource, attr_name) orelse .custom
else
.custom;
Where the enum is:
pub const VertexAttributeSource = enum {
/// Unused
unused,
/// Game code will write this attribute data
custom,
/// Position (vec3)
position,
/// Normal (vec3)
normal,
/// Texture coordinates (vec2)
texcoords,
/// `transform` from RenderMesh (mat4)
transform,
/// Entity id
entity_id,
};
I'm hitting the 1500 limit in @setEvalBranchQuota(1500) (ComptimeStringMapWithEql), but my input strings are short and the enum is small.
It seems like all calls to ComptimeStringMapWithEql affect the branch quota, vs it being reset after leaving the function.