summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-09-19 14:01:18 -0400
committerZack Rusin <[email protected]>2007-09-19 14:01:18 -0400
commitfe555c39bb7fd530298b5be4a8f06bff41726c86 (patch)
tree68b9b24eb883c822266f6ef82608de3a817549fc /src/mesa/pipe/softpipe
parentb6d50abd7d483029469a0faaa28e8e2f2f742c6d (diff)
Convert the rasterizer cso to the new semantics.
Basically make cso hold the driver specific struct, while managing the template.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h8
-rw-r--r--src/mesa/pipe/softpipe/sp_state_rasterizer.c18
2 files changed, 11 insertions, 15 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index 8e7776a6c7d..a20ae1d4a22 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -58,13 +58,13 @@ void softpipe_bind_depth_stencil_state(struct pipe_context *,
void softpipe_delete_depth_stencil_state(struct pipe_context *,
const struct pipe_depth_stencil_state *);
-const struct pipe_rasterizer_state *
+void *
softpipe_create_rasterizer_state(struct pipe_context *,
- const struct pipe_rasterizer_state *);
-void softpipe_bind_rasterizer_state(struct pipe_context *,
const struct pipe_rasterizer_state *);
+void softpipe_bind_rasterizer_state(struct pipe_context *,
+ void *);
void softpipe_delete_rasterizer_state(struct pipe_context *,
- const struct pipe_rasterizer_state *);
+ void *);
void softpipe_set_framebuffer_state( struct pipe_context *,
const struct pipe_framebuffer_state * );
diff --git a/src/mesa/pipe/softpipe/sp_state_rasterizer.c b/src/mesa/pipe/softpipe/sp_state_rasterizer.c
index d832adb91b7..d7845cef826 100644
--- a/src/mesa/pipe/softpipe/sp_state_rasterizer.c
+++ b/src/mesa/pipe/softpipe/sp_state_rasterizer.c
@@ -32,34 +32,30 @@
-const struct pipe_rasterizer_state *
+void *
softpipe_create_rasterizer_state(struct pipe_context *pipe,
- const struct pipe_rasterizer_state *setup)
+ const struct pipe_rasterizer_state *setup)
{
- struct pipe_rasterizer_state *raster =
- malloc(sizeof(struct pipe_rasterizer_state));
- memcpy(raster, setup, sizeof(struct pipe_rasterizer_state));
-
- return raster;
+ return 0;
}
void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
- const struct pipe_rasterizer_state *setup)
+ void *setup)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
/* pass-through to draw module */
draw_set_rasterizer_state(softpipe->draw, setup);
- softpipe->rasterizer = setup;
+ softpipe->rasterizer = (struct pipe_rasterizer_state *)setup;
softpipe->dirty |= SP_NEW_RASTERIZER;
}
void softpipe_delete_rasterizer_state(struct pipe_context *pipe,
- const struct pipe_rasterizer_state *rasterizer)
+ void *rasterizer)
{
- free((struct pipe_rasterizer_state*)rasterizer);
+ /* do nothing */
}