MCPcopy Create free account
hub / github.com/crownengine/crown / parse

Method parse

src/resource/shader_resource.cpp:1495–1516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1493 }
1494
1495 s32 parse(const char *path, bool is_include)
1496 {
1497 TempAllocator256 ta;
1498 DynamicString path_str(ta);
1499 path_str = path;
1500
1501 if (!is_include) {
1502 const char *type = resource_type(path);
1503 if (type != NULL)
1504 _shader_library.set(path, u32(type - path - 1));
1505 else
1506 _shader_library = path;
1507 }
1508
1509 if (hash_set::has(_parsed_includes, path_str))
1510 return 0;
1511
1512 s32 err = parse(_opts.read(path), is_include);
1513 ENSURE_OR_RETURN(SHADER_RESOURCE, err == 0, _opts);
1514 hash_set::insert(_parsed_includes, path_str);
1515 return err;
1516 }
1517
1518 s32 parse(Buffer buf, bool is_include)
1519 {

Callers 5

compileFunction · 0.45
compile_variantFunction · 0.45
parse_data_indexFunction · 0.45
parse_data_mtimesFunction · 0.45
read_data_dependenciesFunction · 0.45

Calls 9

parse_shadersFunction · 0.85
parseFunction · 0.70
hasFunction · 0.50
parse_arrayFunction · 0.50
sizeFunction · 0.50
parse_stringFunction · 0.50
setMethod · 0.45
readMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected