diff options
author | Kenneth Graunke <[email protected]> | 2012-02-09 20:33:44 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-02-28 13:07:12 -0800 |
commit | b823b99ec0f13af257dcd885f436a4d294c6222a (patch) | |
tree | a14501441c082303589b10821ca56c9554c57dc1 /src/glsl/glcpp/glcpp.h | |
parent | 8292b7419d0405e94a5ea270ba710d20f0eb071f (diff) |
glcpp: Don't strlen() the output for every token being printed.
The ralloc string appending functions were originally intended for
simple, non-hot-path uses like printing to an info log.
Cuts Unigine Tropics load time by around 20% (6 seconds).
v2: Avoid strlen() on every newline, too.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]> [v1]
Acked-by: José Fonseca <[email protected]> [v1]
Diffstat (limited to 'src/glsl/glcpp/glcpp.h')
-rw-r--r-- | src/glsl/glcpp/glcpp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp.h b/src/glsl/glcpp/glcpp.h index dc816e90ee7..2d7cad2e601 100644 --- a/src/glsl/glcpp/glcpp.h +++ b/src/glsl/glcpp/glcpp.h @@ -174,6 +174,8 @@ struct glcpp_parser { token_node_t *lex_from_node; char *output; char *info_log; + size_t output_length; + size_t info_log_length; int error; }; |