a7ccde591702842df8856ab73787d284d7f10867
[mesa.git] / src / gallium / drivers / i965 / brw_pipe_misc.c
1
2 #include "brw_context.h"
3 #include "brw_structs.h"
4 #include "brw_defines.h"
5
6 static void brw_set_polygon_stipple( struct pipe_context *pipe,
7 const struct pipe_poly_stipple *stip )
8 {
9 struct brw_context *brw = brw_context(pipe);
10 struct brw_polygon_stipple *bps = &brw->curr.bps;
11 GLuint i;
12
13 memset(bps, 0, sizeof *bps);
14 bps->header.opcode = CMD_POLY_STIPPLE_PATTERN;
15 bps->header.length = sizeof *bps/4-2;
16
17 for (i = 0; i < 32; i++)
18 bps->stipple[i] = stip->stipple[i]; /* don't invert */
19 }
20
21
22
23 void brw_pipe_misc_init( struct brw_context *brw )
24 {
25 brw->base.set_polygon_stipple = brw_set_polygon_stipple;
26 }
27
28
29 void brw_pipe_misc_cleanup( struct brw_context *brw )
30 {
31 }