mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
Change type of shader->executable field from void * to generic function pointer.
Fix warnings in draw_create_vertex_shader()
This commit is contained in:
parent
b21f4ac15f
commit
447c93dd1b
2 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ struct pipe_shader_state {
|
|||
#if defined(__i386__) || defined(__386__)
|
||||
struct x86_function sse2_program;
|
||||
#endif
|
||||
void *executable;
|
||||
void (*executable)();
|
||||
|
||||
ubyte num_inputs;
|
||||
ubyte num_outputs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue