summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-02-09 20:03:36 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-02-28 13:07:12 -0800
commit8292b7419d0405e94a5ea270ba710d20f0eb071f (patch)
tree06aacf1c3dfc3c592909f54bb57a48d56267c3a8 /src/glsl/linker.h
parent579ccae73d29211c9f5c01ba527e1743ea39c94e (diff)
downloadexternal_mesa3d-8292b7419d0405e94a5ea270ba710d20f0eb071f.zip
external_mesa3d-8292b7419d0405e94a5ea270ba710d20f0eb071f.tar.gz
external_mesa3d-8292b7419d0405e94a5ea270ba710d20f0eb071f.tar.bz2
ralloc: Make rewrite_tail increase "start" by the new text's length.
Both callers of rewrite_tail immediately compute the new total string length by adding the (known) length of the existing string plus the length of the newly appended text. Unfortunately, callers generally won't know the length of the new text, as it's printf-formatted. Since ralloc already computes this length, it makes sense to add it in and save the caller the effort. This simplifies both existing callers, but more importantly, will allow for cheap-appending in the next commit. v2: The link_uniforms code needs both the old and new length. Apply the obvious fix (which sadly makes it less of a cleanup). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1] Acked-by: José Fonseca <jfonseca@vmware.com> [v1]
Diffstat (limited to 'src/glsl/linker.h')
-rw-r--r--src/glsl/linker.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/linker.h b/src/glsl/linker.h
index 433c63b..0b4c001 100644
--- a/src/glsl/linker.h
+++ b/src/glsl/linker.h
@@ -76,7 +76,7 @@ private:
* \param name_length Length of the current name \b not including the
* terminating \c NUL character.
*/
- void recursion(const glsl_type *t, char **name, unsigned name_length);
+ void recursion(const glsl_type *t, char **name, size_t name_length);
};
#endif /* GLSL_LINKER_H */