diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/pipe/draw/draw_context.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_context.h | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 532c9c3682f..a808fb77770 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -158,7 +158,7 @@ static void validate_pipeline( struct draw_context *draw ) void draw_set_setup_state( struct draw_context *draw, const struct pipe_setup_state *setup ) { - memcpy( &draw->setup, setup, sizeof(*setup) ); + draw->setup = *setup; /* struct copy */ validate_pipeline( draw ); } diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h index e1b4848ab38..74fdd46262e 100644 --- a/src/mesa/pipe/draw/draw_context.h +++ b/src/mesa/pipe/draw/draw_context.h @@ -46,6 +46,10 @@ struct draw_context; struct draw_stage; +/** + * Clipmask flags + */ +/*@{*/ #define CLIP_RIGHT_BIT 0x01 #define CLIP_LEFT_BIT 0x02 #define CLIP_TOP_BIT 0x04 @@ -54,7 +58,19 @@ struct draw_stage; #define CLIP_FAR_BIT 0x20 #define CLIP_USER_BIT 0x40 #define CLIP_CULL_BIT 0x80 +/*@}*/ +/** + * Bitshift for each clip flag + */ +/*@{*/ +#define CLIP_RIGHT_SHIFT 0 +#define CLIP_LEFT_SHIFT 1 +#define CLIP_TOP_SHIFT 2 +#define CLIP_BOTTOM_SHIFT 3 +#define CLIP_NEAR_SHIFT 4 +#define CLIP_FAR_SHIFT 5 +/*@}*/ struct draw_context *draw_create( void ); |