ctx->blitter.saved_fb_state.nr_cbufs = ~0;
ctx->blitter.saved_num_sampler_views = ~0;
ctx->blitter.saved_num_sampler_states = ~0;
+ ctx->blitter.saved_num_vertex_buffers = ~0;
/* blend state objects */
memset(&blend, 0, sizeof(blend));
ctx->blitter.saved_sampler_views);
ctx->blitter.saved_num_sampler_views = ~0;
}
+
+ if (ctx->blitter.saved_num_vertex_buffers != ~0) {
+ pipe->set_vertex_buffers(pipe,
+ ctx->blitter.saved_num_vertex_buffers,
+ ctx->blitter.saved_vertex_buffers);
+ ctx->blitter.saved_num_vertex_buffers = ~0;
+ }
}
static void blitter_set_rectangle(struct blitter_context_priv *ctx,
int saved_num_sampler_views;
struct pipe_sampler_view *saved_sampler_views[PIPE_MAX_SAMPLERS];
+
+ int saved_num_vertex_buffers;
+ struct pipe_vertex_buffer saved_vertex_buffers[PIPE_MAX_ATTRIBS];
};
/**
num_views * sizeof(struct pipe_sampler_view *));
}
+static INLINE void
+util_blitter_save_vertex_buffers(struct blitter_context *blitter,
+ int num_vertex_buffers,
+ struct pipe_vertex_buffer *vertex_buffers)
+{
+ assert(num_vertex_buffers <= Elements(blitter->saved_vertex_buffers));
+
+ blitter->saved_num_vertex_buffers = num_vertex_buffers;
+ memcpy(blitter->saved_vertex_buffers,
+ vertex_buffers,
+ num_vertex_buffers * sizeof(struct pipe_vertex_buffer));
+}
+
#ifdef __cplusplus
}
#endif