summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv10
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r--src/gallium/drivers/nv10/nv10_state.c4
-rw-r--r--src/gallium/drivers/nv10/nv10_state.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c
index 9b8b7801cdf..43b9c32f12d 100644
--- a/src/gallium/drivers/nv10/nv10_state.c
+++ b/src/gallium/drivers/nv10/nv10_state.c
@@ -4,6 +4,7 @@
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
+#include "tgsi/util/tgsi_parse.h"
#include "nv10_context.h"
#include "nv10_state.h"
@@ -407,7 +408,7 @@ nv10_fp_state_create(struct pipe_context *pipe,
struct nv10_fragment_program *fp;
fp = CALLOC(1, sizeof(struct nv10_fragment_program));
- fp->pipe = cso;
+ fp->pipe.tokens = tgsi_dup_tokens(cso->tokens);
tgsi_scan_shader(cso->tokens, &fp->info);
@@ -431,6 +432,7 @@ nv10_fp_state_delete(struct pipe_context *pipe, void *hwcso)
struct nv10_fragment_program *fp = hwcso;
nv10_fragprog_destroy(nv10, fp);
+ FREE((void*)fp->pipe.tokens);
FREE(fp);
}
diff --git a/src/gallium/drivers/nv10/nv10_state.h b/src/gallium/drivers/nv10/nv10_state.h
index 3ca501d1356..f1f9a12110f 100644
--- a/src/gallium/drivers/nv10/nv10_state.h
+++ b/src/gallium/drivers/nv10/nv10_state.h
@@ -79,7 +79,7 @@ struct nv10_fragment_program_data {
};
struct nv10_fragment_program {
- const struct pipe_shader_state *pipe;
+ struct pipe_shader_state pipe;
struct tgsi_shader_info info;
boolean translated;