summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/failover
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/failover')
-rw-r--r--src/gallium/drivers/failover/fo_context.h2
-rw-r--r--src/gallium/drivers/failover/fo_state.c14
-rw-r--r--src/gallium/drivers/failover/fo_state_emit.c3
3 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/failover/fo_context.h b/src/gallium/drivers/failover/fo_context.h
index 88ae5ad60d..9d3e0d0dba 100644
--- a/src/gallium/drivers/failover/fo_context.h
+++ b/src/gallium/drivers/failover/fo_context.h
@@ -55,6 +55,7 @@
#define FO_NEW_CLEAR_COLOR 0x20000
#define FO_NEW_VERTEX_BUFFER 0x40000
#define FO_NEW_VERTEX_ELEMENT 0x80000
+#define FO_NEW_SAMPLE_MASK 0x100000
@@ -90,6 +91,7 @@ struct failover_context {
struct pipe_blend_color blend_color;
struct pipe_stencil_ref stencil_ref;
struct pipe_clip_state clip;
+ unsigned sample_mask;
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c
index 272e683067..12e42379f9 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;
diff --git a/src/gallium/drivers/failover/fo_state_emit.c b/src/gallium/drivers/failover/fo_state_emit.c
index 42bd6929a7..147f23269c 100644
--- a/src/gallium/drivers/failover/fo_state_emit.c
+++ b/src/gallium/drivers/failover/fo_state_emit.c
@@ -63,6 +63,9 @@ failover_state_emit( struct failover_context *failover )
if (failover->dirty & FO_NEW_CLIP)
failover->sw->set_clip_state( failover->sw, &failover->clip );
+ if (failover->dirty & FO_NEW_SAMPLE_MASK)
+ failover->sw->set_sample_mask( failover->sw, failover->sample_mask );
+
if (failover->dirty & FO_NEW_DEPTH_STENCIL)
failover->sw->bind_depth_stencil_alpha_state( failover->sw,
failover->depth_stencil->sw_state );