summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-09-12 15:08:04 -0600
committerBrian Paul <brianp@vmware.com>2013-09-12 18:07:43 -0600
commitb4317ef940e9e2e67ba649e9a897beecca3bf862 (patch)
tree9457eb72e00ca0459e42875f2e7f2d4e5963aa12
parent581fa62acb2402e8d4c756e21f93b62fd187b266 (diff)
rbug: implement pipe_context::bind_sampler_states()
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 721419750b..1a46882ebd 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -263,6 +263,39 @@ rbug_create_sampler_state(struct pipe_context *_pipe,
}
static void
+rbug_bind_sampler_states(struct pipe_context *_pipe, unsigned shader,
+ unsigned start, unsigned count,
+ void **samplers)
+{
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct pipe_context *pipe = rb_pipe->pipe;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ if (pipe->bind_sampler_states) {
+ pipe->bind_sampler_states(pipe, shader, start, count, samplers);
+ }
+ else {
+ assert(start == 0);
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ pipe->bind_vertex_sampler_states(pipe, count, samplers);
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ pipe->bind_fragment_sampler_states(pipe, count, samplers);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ pipe->bind_geometry_sampler_states(pipe, count, samplers);
+ break;
+ default:
+ ;
+ }
+ }
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+}
+
+
+static void
rbug_bind_fragment_sampler_states(struct pipe_context *_pipe,
unsigned num_samplers,
void **samplers)
@@ -1146,6 +1179,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
rb_pipe->base.bind_blend_state = rbug_bind_blend_state;
rb_pipe->base.delete_blend_state = rbug_delete_blend_state;
rb_pipe->base.create_sampler_state = rbug_create_sampler_state;
+ rb_pipe->base.bind_sampler_states = rbug_bind_sampler_states;
rb_pipe->base.bind_fragment_sampler_states = rbug_bind_fragment_sampler_states;
rb_pipe->base.bind_vertex_sampler_states = rbug_bind_vertex_sampler_states;
rb_pipe->base.delete_sampler_state = rbug_delete_sampler_state;