gallium/postprocessing: fix shader parsing

tokens was converted to a pointer, which made the Elements macro return 1.

Broken by e87fc11cac.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák
2013-07-30 22:29:12 +02:00
parent c40f8d087a
commit c84e8d039e

View File

@@ -218,8 +218,8 @@ pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs,
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;
}