summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-19 08:35:53 -0600
committerBrian Paul <brianp@vmware.com>2010-04-19 08:35:53 -0600
commite3a34cc7f6c9f959cdc2af4486e84587fab4d0d7 (patch)
tree437667e2b7da27f03c190bee6b67bff260af0733 /src/gallium/auxiliary/draw/draw_private.h
parentdb3b34219ef1dbf9ebf5e524d3e459f9ad9571b5 (diff)
gallium/draw: use correct rasterization state for wide/AA points/lines
When points or lines are decomposed into triangles, we need to be sure to disable polygon culling, stippling, "un-filled" modes, etc. This patch sets the rasterization state to disable those things prior to drawing points/lines with triangles, then restores the previous state afterward. The new piglit point-no-line-cull test checks this problem & solution.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 1e6e01af9e..3fe3dc519d 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -82,6 +82,8 @@ struct vertex_header {
*/
struct draw_context
{
+ struct pipe_context *pipe;
+
/** Drawing/primitive pipeline stages */
struct {
struct draw_stage *first; /**< one of the following */
@@ -174,8 +176,14 @@ struct draw_context
double mrd; /**< minimum resolvable depth value, for polygon offset */
- /* pipe state that we need: */
+ /** Current rasterizer state given to us by the driver */
const struct pipe_rasterizer_state *rasterizer;
+ /** Driver CSO handle for the current rasterizer state */
+ void *rast_handle;
+
+ /** Rasterizer CSOs without culling/stipple/etc */
+ void *rasterizer_no_cull[2][2];
+
struct pipe_viewport_state viewport;
boolean identity_viewport;
@@ -345,5 +353,10 @@ void draw_do_flush( struct draw_context *draw, unsigned flags );
+void *
+draw_get_rasterizer_no_cull( struct draw_context *draw,
+ boolean scissor,
+ boolean flatshade );
+
#endif /* DRAW_PRIVATE_H */