summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 470c1c571b4..b3c65c90d67 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -444,3 +444,19 @@ void draw_set_render( struct draw_context *draw,
{
draw->render = render;
}
+
+void draw_set_edgeflags( struct draw_context *draw,
+ const unsigned *edgeflag )
+{
+ draw->user.edgeflag = edgeflag;
+}
+
+
+boolean draw_get_edgeflag( struct draw_context *draw,
+ unsigned idx )
+{
+ if (draw->user.edgeflag)
+ return (draw->user.edgeflag[idx/32] & (1 << (idx%32))) != 0;
+ else
+ return 1;
+}