summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-09-12 15:07:21 -0600
committerBrian Paul <brianp@vmware.com>2013-10-03 14:05:26 -0600
commitaec11d48cf60a67924a892e7f42c93065efef0f1 (patch)
tree81c53830efd73a731e4caa4bd9d0da6b347d7af9
parente5d000c3f1df8af82c602bb714b4da5ed8fe4347 (diff)
i915g: implement pipe_context::bind_sampler_states()
-rw-r--r--src/gallium/drivers/i915/i915_state.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 8ca69fc790e..ba4a91703f3 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -342,6 +342,27 @@ static void i915_bind_fragment_sampler_states(struct pipe_context *pipe,
i915->dirty |= I915_NEW_SAMPLER;
}
+
+static void
+i915_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
+ unsigned start, unsigned num_samplers,
+ void **samplers)
+{
+ assert(start == 0);
+
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ i915_bind_vertex_sampler_states(pipe, num_samplers, samplers);
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ i915_bind_fragment_sampler_states(pipe, num_samplers, samplers);
+ break;
+ default:
+ ;
+ }
+}
+
+
static void i915_delete_sampler_state(struct pipe_context *pipe,
void *sampler)
{
@@ -1015,6 +1036,7 @@ i915_init_state_functions( struct i915_context *i915 )
i915->base.delete_blend_state = i915_delete_blend_state;
i915->base.create_sampler_state = i915_create_sampler_state;
+ i915->base.bind_sampler_states = i915_bind_sampler_states;
i915->base.bind_fragment_sampler_states = i915_bind_fragment_sampler_states;
i915->base.bind_vertex_sampler_states = i915_bind_vertex_sampler_states;
i915->base.delete_sampler_state = i915_delete_sampler_state;