diff options
author | Brian <brian@poulsbo.localnet.net> | 2008-03-12 13:20:29 -0600 |
---|---|---|
committer | Brian <brian@poulsbo.localnet.net> | 2008-03-12 13:20:29 -0600 |
commit | 12ab5f97013e398b9f6485b97d6691c3c170447a (patch) | |
tree | d4de4f6ef45233b0395fa65a6244c308a20aa830 /src/gallium/auxiliary/draw/draw_vs_exec.c | |
parent | ba75e82b6ebaf88dd2e4a8f764b2d296d715bf8a (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_exec.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c index 514303e0ea..55bec14116 100644 --- a/src/gallium/auxiliary/draw/draw_vs_exec.c +++ b/src/gallium/auxiliary/draw/draw_vs_exec.c @@ -71,7 +71,7 @@ vs_exec_prepare( struct draw_vertex_shader *shader, { /* specify the vertex program to interpret/execute */ tgsi_exec_machine_bind_shader(&draw->machine, - shader->state->tokens, + shader->state.tokens, PIPE_MAX_SAMPLERS, NULL /*samplers*/ ); @@ -187,7 +187,7 @@ draw_create_vs_exec(struct draw_context *draw, if (vs == NULL) return NULL; - vs->state = state; + vs->state = *state; vs->prepare = vs_exec_prepare; vs->run = vs_exec_run; vs->delete = vs_exec_delete; |