summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-03 15:03:52 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-03 15:03:52 -0700
commitaa7f2333675f3e005f3eb6a40ac55d2fb55ea36e (patch)
treef1e50d3239cacbcb01556f04794f13206f73c628 /src/mesa/pipe/draw
parent1613c49c9859f55dfb5bea23c46a3be54b246a9b (diff)
replace void * with struct draw_vertex_shader opaque type
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_context.h10
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader.c16
2 files changed, 12 insertions, 14 deletions
diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h
index 6dc6e4ce82..60be3e194d 100644
--- a/src/mesa/pipe/draw/draw_context.h
+++ b/src/mesa/pipe/draw/draw_context.h
@@ -45,6 +45,7 @@ struct vertex_buffer;
struct vertex_info;
struct draw_context;
struct draw_stage;
+struct draw_vertex_shader;
/**
@@ -89,12 +90,13 @@ void draw_set_rasterize_stage( struct draw_context *draw,
struct draw_stage *stage );
-void * draw_create_vertex_shader(struct draw_context *draw,
- const struct pipe_shader_state *shader);
+struct draw_vertex_shader *
+draw_create_vertex_shader(struct draw_context *draw,
+ const struct pipe_shader_state *shader);
void draw_bind_vertex_shader(struct draw_context *draw,
- void *vcso);
+ struct draw_vertex_shader *dvs);
void draw_delete_vertex_shader(struct draw_context *draw,
- void *vcso);
+ struct draw_vertex_shader *dvs);
boolean draw_use_sse(struct draw_context *draw);
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c
index d34d923018..1fa9af8cec 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader.c
@@ -227,7 +227,7 @@ void draw_vertex_shader_queue_flush( struct draw_context *draw )
}
-void *
+struct draw_vertex_shader *
draw_create_vertex_shader(struct draw_context *draw,
const struct pipe_shader_state *shader)
{
@@ -263,10 +263,10 @@ draw_create_vertex_shader(struct draw_context *draw,
}
void draw_bind_vertex_shader(struct draw_context *draw,
- void *vcso)
+ struct draw_vertex_shader *dvs)
{
draw_flush(draw);
- draw->vertex_shader = (struct draw_vertex_shader*)(vcso);
+ draw->vertex_shader = dvs;
/* specify the fragment program to interpret/execute */
tgsi_exec_machine_init(&draw->machine,
@@ -276,15 +276,11 @@ void draw_bind_vertex_shader(struct draw_context *draw,
}
void draw_delete_vertex_shader(struct draw_context *draw,
- void *vcso)
+ struct draw_vertex_shader *dvs)
{
- struct draw_vertex_shader *vs;
-
- vs = (struct draw_vertex_shader *) vcso;
-
#if defined(__i386__) || defined(__386__)
- x86_release_func( (struct x86_function *) &vs->sse2_program );
+ x86_release_func( (struct x86_function *) &dvs->sse2_program );
#endif
- FREE( vs );
+ FREE( dvs );
}