diff options
author | Roland Scheidegger <[email protected]> | 2010-05-18 16:20:44 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-18 16:20:44 +0200 |
commit | 43234cee40c48e14a3eab4268181d9b0b2b7cf79 (patch) | |
tree | 4eafa9bb75559f0502038796491da1f6ee0ffea3 /src/gallium/drivers/failover/fo_state.c | |
parent | 2a15553e431f04d13b757a3a76e4eb7d794f1219 (diff) |
gallium: implement set_sample_mask() in all drivers
prevents segfault when state trackers try to set default mask.
Other option would be to make this required only for drivers
supporting multisampling, but this seems more clean.
Only dummy implementations (for normal drivers) provided (no driver
supports multisampling yet neither).
Diffstat (limited to 'src/gallium/drivers/failover/fo_state.c')
-rw-r--r-- | src/gallium/drivers/failover/fo_state.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c index 272e683067e..12e42379f98 100644 --- a/src/gallium/drivers/failover/fo_state.c +++ b/src/gallium/drivers/failover/fo_state.c @@ -125,6 +125,19 @@ failover_set_clip_state( struct pipe_context *pipe, failover->hw->set_clip_state( failover->hw, clip ); } +static void +failover_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ + struct failover_context *failover = failover_context(pipe); + + failover->sample_mask = sample_mask; + failover->dirty |= FO_NEW_SAMPLE_MASK; + failover->sw->set_sample_mask( failover->sw, sample_mask ); + failover->hw->set_sample_mask( failover->hw, sample_mask ); + +} + static void * failover_create_depth_stencil_state(struct pipe_context *pipe, @@ -614,6 +627,7 @@ failover_init_state_functions( struct failover_context *failover ) failover->pipe.set_blend_color = failover_set_blend_color; failover->pipe.set_stencil_ref = failover_set_stencil_ref; failover->pipe.set_clip_state = failover_set_clip_state; + failover->pipe.set_sample_mask = failover_set_sample_mask; failover->pipe.set_framebuffer_state = failover_set_framebuffer_state; failover->pipe.set_polygon_stipple = failover_set_polygon_stipple; failover->pipe.set_scissor_state = failover_set_scissor_state; |