summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_vs_sse.c
diff options
context:
space:
mode:
authorBrian <brian@poulsbo.localnet.net>2008-03-12 13:20:29 -0600
committerBrian <brian@poulsbo.localnet.net>2008-03-12 13:20:29 -0600
commit12ab5f97013e398b9f6485b97d6691c3c170447a (patch)
treed4de4f6ef45233b0395fa65a6244c308a20aa830 /src/gallium/auxiliary/draw/draw_vs_sse.c
parentba75e82b6ebaf88dd2e4a8f764b2d296d715bf8a (diff)
gallium: change draw_vertex_shader->state from pointer to struct
We were sometimes keeping a pointer to a stack-allocated object. Now make a copy of the pipe_shader_state object. This should fix some seemingly random memory errors/crashes.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_sse.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_sse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c
index e5c1a40cca..5ee2adb344 100644
--- a/src/gallium/auxiliary/draw/draw_vs_sse.c
+++ b/src/gallium/auxiliary/draw/draw_vs_sse.c
@@ -221,14 +221,14 @@ draw_create_vs_sse(struct draw_context *draw,
if (vs == NULL)
return NULL;
- vs->base.state = templ;
+ vs->base.state = *templ;
vs->base.prepare = vs_sse_prepare;
vs->base.run = vs_sse_run;
vs->base.delete = vs_sse_delete;
x86_init_func( &vs->sse2_program );
- if (!tgsi_emit_sse2( (struct tgsi_token *) vs->base.state->tokens,
+ if (!tgsi_emit_sse2( (struct tgsi_token *) vs->base.state.tokens,
&vs->sse2_program ))
goto fail;