+static void
+i915_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
+ unsigned start, unsigned num,
+ struct pipe_sampler_view **views)
+{
+ assert(start == 0);
+ switch (shader) {
+ case PIPE_SHADER_FRAGMENT:
+ i915_set_fragment_sampler_views(pipe, num, views);
+ break;
+ case PIPE_SHADER_VERTEX:
+ i915_set_vertex_sampler_views(pipe, num, views);
+ break;
+ default:
+ ;
+ }
+}
+
+
+struct pipe_sampler_view *
+i915_create_sampler_view_custom(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ const struct pipe_sampler_view *templ,
+ unsigned width0,
+ unsigned height0)
+{
+ struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view);
+
+ if (view) {
+ *view = *templ;
+ view->reference.count = 1;
+ view->texture = NULL;
+ pipe_resource_reference(&view->texture, texture);
+ view->context = pipe;
+ }
+
+ return view;
+}
+