diff options
author | Brian <[email protected]> | 2006-12-19 18:02:03 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2006-12-19 18:02:03 -0700 |
commit | 5b01c5e9d2c0283cc31981b6c85dc6392144b3db (patch) | |
tree | 754a7cf9d00ce39e8dfee63a5af6439f8c1d5be4 /src/mesa/shader/prog_parameter.c | |
parent | 46b06bdb2664b7a553fdc9e30367001ab39db804 (diff) |
Overhaul of GLSL API functions, dispatching, etc.
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r-- | src/mesa/shader/prog_parameter.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 7094d6fc038..84e92d7ed0a 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -444,3 +444,22 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) return clone; } + + +/** + * Find longest name of any parameter in list. + */ +GLuint +_mesa_parameter_longest_name(const struct gl_program_parameter_list *list) +{ + GLuint i, maxLen = 0; + if (!list) + return 0; + for (i = 0; i < list->NumParameters; i++) { + GLuint len = _mesa_strlen(list->Parameters[i].Name); + if (len > maxLen) + maxLen = len; + } + return maxLen; +} + |