summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache/cso_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_context.c')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index c638239e80..47867e888a 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -93,6 +93,7 @@ struct cso_context {
struct pipe_framebuffer_state fb, fb_saved;
struct pipe_viewport_state vp, vp_saved;
struct pipe_blend_color blend_color;
+ struct pipe_stencil_ref stencil_ref;
};
@@ -1069,6 +1070,16 @@ enum pipe_error cso_set_blend_color(struct cso_context *ctx,
return PIPE_OK;
}
+enum pipe_error cso_set_stencil_ref(struct cso_context *ctx,
+ const struct pipe_stencil_ref *sr)
+{
+ if (memcmp(&ctx->stencil_ref, sr, sizeof(ctx->stencil_ref))) {
+ ctx->stencil_ref = *sr;
+ ctx->pipe->set_stencil_ref(ctx->pipe, sr);
+ }
+ return PIPE_OK;
+}
+
enum pipe_error cso_set_geometry_shader_handle(struct cso_context *ctx,
void *handle)
{