summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-08-28 21:52:13 -0400
committerIlia Mirkin <[email protected]>2014-08-28 21:53:55 -0400
commitb4418cd4ce17cb6068fcb2c7dab874f4c4d880e1 (patch)
tree14b05eda5bdc6497b56fd20a23b91c28fcba1be2 /src/gallium/drivers/nouveau
parent76e5406e585c0d001fc215cda080d450e93d426f (diff)
nouveau: allow more tokens by default to avoid parse failures
Also print a note saying that parsing failed to help isolate issues. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_compiler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_compiler.c b/src/gallium/drivers/nouveau/nouveau_compiler.c
index ac22035ca82..86604984220 100644
--- a/src/gallium/drivers/nouveau/nouveau_compiler.c
+++ b/src/gallium/drivers/nouveau/nouveau_compiler.c
@@ -139,7 +139,7 @@ nouveau_codegen(int chipset, int type, struct tgsi_token tokens[],
int
main(int argc, char *argv[])
{
- struct tgsi_token tokens[1024];
+ struct tgsi_token tokens[4096];
int i, chipset = 0, type = -1;
const char *filename = NULL;
FILE *f;
@@ -195,8 +195,10 @@ main(int argc, char *argv[])
return 1;
}
- if (!tgsi_text_translate(text, tokens, Elements(tokens)))
+ if (!tgsi_text_translate(text, tokens, Elements(tokens))) {
+ _debug_printf("Failed to parse TGSI shader\n");
return 1;
+ }
if (chipset >= 0x50) {
i = nouveau_codegen(chipset, type, tokens, &size, &code);