| 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 | { |
no test coverage detected