tokens was converted to a pointer, which made the Elements macro return 1.
Broken by
e87fc11cac696881469a57955af2ac7b4929a2c7.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
return NULL;
}
- if (tgsi_text_translate(text, tokens, Elements(tokens)) == FALSE) {
- pp_debug("Failed to translate %s\n", name);
+ if (tgsi_text_translate(text, tokens, PP_MAX_TOKENS) == FALSE) {
+ _debug_printf("pp: Failed to translate a shader for %s\n", name);
return NULL;
}