diff options
author | Brian <[email protected]> | 2007-10-18 11:09:12 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-18 11:41:13 -0600 |
commit | 447c93dd1b3bb31fe19fa81b32d1c3c62ab65c54 (patch) | |
tree | 9b3f323b26ff2a63d3debe1a1e77fe16341cb61e /src/mesa/pipe/draw | |
parent | b21f4ac15fc190b474e1686d50a6992caed9c388 (diff) |
Change type of shader->executable field from void * to generic function pointer.
Fix warnings in draw_create_vertex_shader()
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_shader.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index 8519daf17c1..fd0183f8cd4 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -212,12 +212,14 @@ draw_create_vertex_shader(struct draw_context *draw, vs->state = shader; #if defined(__i386__) || defined(__386__) if (draw->use_sse) { - x86_init_func( &shader->sse2_program ); + /* cast-away const */ + struct pipe_shader_state *sh = (struct pipe_shader_state *) shader; - tgsi_emit_sse2( shader->tokens, &shader->sse2_program ); + x86_init_func( &sh->sse2_program ); - ((struct pipe_shader_state *)shader)->executable = (void *) - x86_get_func( &shader->sse2_program ); + tgsi_emit_sse2( sh->tokens, &sh->sse2_program ); + + sh->executable = x86_get_func( &sh->sse2_program ); } #endif |