summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 8e5ed459495..9fbef9be82a 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -283,6 +283,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
ctx->rs_discard_state = pipe->create_rasterizer_state(pipe, &rs_state);
}
+ ctx->base.cb_slot = 0; /* 0 for now */
ctx->base.vb_slot = 0; /* 0 for now */
/* vertex elements states */
@@ -698,6 +699,15 @@ void util_blitter_restore_textures(struct blitter_context *blitter)
ctx->base.saved_num_sampler_views = ~0;
}
+void util_blitter_restore_constant_buffer_state(struct blitter_context *blitter)
+{
+ struct pipe_context *pipe = blitter->pipe;
+
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, blitter->cb_slot,
+ &blitter->saved_fs_constant_buffer);
+ pipe_resource_reference(&blitter->saved_fs_constant_buffer.buffer, NULL);
+}
+
static void blitter_set_rectangle(struct blitter_context_priv *ctx,
int x1, int y1, int x2, int y2,
float depth)