summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-03 10:43:14 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-03 17:21:22 -0600
commit00eb309c31692d29b01568b0b45f5066928b9107 (patch)
tree9a73d519d6d93a53d602421af0ca1081e77ace13 /src/mesa
parent3c128748579c637ba7c777ba91ff4287a03190f6 (diff)
gallium: move, increase ST_MAX_SHADER_TOKENS
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_program.c7
-rw-r--r--src/mesa/state_tracker/st_program.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 958096f68e..5966bbadae 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -49,6 +49,9 @@
#include "cso_cache/cso_context.h"
+#define ST_MAX_SHADER_TOKENS 4096
+
+
#define TGSI_DEBUG 0
@@ -296,6 +299,8 @@ st_translate_vertex_program(struct st_context *st,
/* tokenized result */
tokens, ST_MAX_SHADER_TOKENS);
+ assert(num_tokens < ST_MAX_SHADER_TOKENS);
+
vs.tokens = (struct tgsi_token *)
mem_dup(tokens, num_tokens * sizeof(tokens[0]));
@@ -467,6 +472,8 @@ st_translate_fragment_program(struct st_context *st,
/* tokenized result */
tokens, ST_MAX_SHADER_TOKENS);
+ assert(num_tokens < ST_MAX_SHADER_TOKENS);
+
fs.tokens = (struct tgsi_token *)
mem_dup(tokens, num_tokens * sizeof(tokens[0]));
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index bf07a50789..086e9391aa 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -39,9 +39,6 @@
#include "pipe/p_shader_tokens.h"
-#define ST_MAX_SHADER_TOKENS 1024
-
-
struct cso_fragment_shader;
struct cso_vertex_shader;
struct translated_vertex_program;