aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2012-03-02 20:13:38 -0500
committerZack Rusin <[email protected]>2012-03-07 19:17:27 -0500
commit831de96db87ee1f16b60d3aff308a423fece3407 (patch)
tree95db31813bec8ff938d333f9af5dc5ecf6000a50 /src/gallium/auxiliary/draw
parentd249bd9cbd38c8da5b3f11d3c50bdbfc612cf1e5 (diff)
svga: fix the rasterizer state resets
draw module calls back into the driver and sets certain parts of the state to whatever it needs, unfortunately unless you get the ordering of calls to draw just right you'll end up reseting your own driver state. That's what was happening to us draw module would under certain conditions reset our own driver state. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index 02c176e8f4b..f3a3f232322 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -80,6 +80,21 @@ void draw_set_viewport_state( struct draw_context *draw,
void draw_set_clip_state( struct draw_context *pipe,
const struct pipe_clip_state *clip );
+/**
+ * Sets the rasterization state used by the draw module.
+ * The rast_handle is used to pass the driver specific representation
+ * of the rasterization state. It's going to be used when the
+ * draw module sets the state back on the driver itself using the
+ * pipe::bind_rasterizer_state method.
+ *
+ * NOTE: if you're calling this function from within the pipe's
+ * bind_rasterizer_state you should always call it before binding
+ * the actual state - that's because the draw module can try to
+ * bind its own rasterizer state which would reset your newly
+ * set state. i.e. always do
+ * draw_set_rasterizer_state(driver->draw, state->pipe_state, state);
+ * driver->state.raster = state;
+ */
void draw_set_rasterizer_state( struct draw_context *draw,
const struct pipe_rasterizer_state *raster,
void *rast_handle );