+ mtx_lock(&rb_pipe->call_mutex);
+ pipe->set_sample_mask(pipe, sample_mask);
+ mtx_unlock(&rb_pipe->call_mutex);
+}
+
+static struct pipe_stream_output_target *
+rbug_create_stream_output_target(struct pipe_context *_pipe,
+ struct pipe_resource *_res,
+ unsigned buffer_offset, unsigned buffer_size)
+{
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct pipe_context *pipe = rb_pipe->pipe;
+ struct pipe_resource *res = rbug_resource_unwrap(_res);
+ struct pipe_stream_output_target *target;
+
+ mtx_lock(&rb_pipe->call_mutex);
+ target = pipe->create_stream_output_target(pipe, res, buffer_offset,
+ buffer_size);
+ mtx_unlock(&rb_pipe->call_mutex);
+ return target;
+}
+
+static void
+rbug_stream_output_target_destroy(struct pipe_context *_pipe,
+ struct pipe_stream_output_target *target)
+{
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct pipe_context *pipe = rb_pipe->pipe;