2 #include "brw_context.h"
3 #include "brw_structs.h"
4 #include "brw_defines.h"
6 static void brw_set_polygon_stipple( struct pipe_context
*pipe
,
7 const struct pipe_poly_stipple
*stip
)
9 struct brw_context
*brw
= brw_context(pipe
);
10 struct brw_polygon_stipple
*bps
= &brw
->curr
.bps
;
13 memset(bps
, 0, sizeof *bps
);
14 bps
->header
.opcode
= CMD_POLY_STIPPLE_PATTERN
;
15 bps
->header
.length
= sizeof *bps
/4-2;
17 for (i
= 0; i
< 32; i
++)
18 bps
->stipple
[i
] = stip
->stipple
[i
]; /* don't invert */
20 brw
->state
.dirty
.mesa
|= PIPE_NEW_POLYGON_STIPPLE
;
24 static void brw_set_scissor_state( struct pipe_context
*pipe
,
25 const struct pipe_scissor_state
*scissor
)
27 struct brw_context
*brw
= brw_context(pipe
);
29 brw
->curr
.scissor
= *scissor
;
30 brw
->state
.dirty
.mesa
|= PIPE_NEW_SCISSOR
;
34 static void brw_set_clip_state( struct pipe_context
*pipe
,
35 const struct pipe_clip_state
*clip
)
37 struct brw_context
*brw
= brw_context(pipe
);
39 brw
->curr
.ucp
= *clip
;
40 brw
->state
.dirty
.mesa
|= PIPE_NEW_CLIP
;
44 void brw_pipe_misc_init( struct brw_context
*brw
)
46 brw
->base
.set_polygon_stipple
= brw_set_polygon_stipple
;
47 brw
->base
.set_scissor_state
= brw_set_scissor_state
;
48 brw
->base
.set_clip_state
= brw_set_clip_state
;
52 void brw_pipe_misc_cleanup( struct brw_context
*brw
)