diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 11 | ||||
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 6d0b420798..50736f06b3 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -98,6 +98,7 @@ struct cso_context { struct pipe_framebuffer_state fb, fb_saved; struct pipe_viewport_state vp, vp_saved; struct pipe_blend_color blend_color; + unsigned sample_mask sample_mask; struct pipe_stencil_ref stencil_ref, stencil_ref_saved; }; @@ -984,6 +985,16 @@ enum pipe_error cso_set_blend_color(struct cso_context *ctx, return PIPE_OK; } +enum pipe_error cso_set_sample_mask(struct cso_context *ctx, + unsigned sample_mask) +{ + if (ctx->sample_mask != sample_mask) { + ctx->sample_mask = sample_mask; + ctx->pipe->set_sample_mask(ctx->pipe, sample_mask); + } + return PIPE_OK; +} + enum pipe_error cso_set_stencil_ref(struct cso_context *ctx, const struct pipe_stencil_ref *sr) { diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index d6bcb1fe8f..f0b07f7376 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -159,6 +159,8 @@ void cso_restore_viewport(struct cso_context *cso); enum pipe_error cso_set_blend_color(struct cso_context *cso, const struct pipe_blend_color *bc); +enum pipe_error cso_set_sample_mask(struct cso_context *cso, + unsigned stencil_mask); enum pipe_error cso_set_stencil_ref(struct cso_context *cso, const struct pipe_stencil_ref *sr); |