softpipe->pipe.set_scissor_state = softpipe_set_scissor_state;
softpipe->pipe.set_fragment_sampler_views = softpipe_set_sampler_views;
softpipe->pipe.set_vertex_sampler_views = softpipe_set_vertex_sampler_views;
+ softpipe->pipe.create_sampler_view = softpipe_create_sampler_view;
+ softpipe->pipe.sampler_view_destroy = softpipe_sampler_view_destroy;
softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
softpipe->pipe.set_vertex_buffers = softpipe_set_vertex_buffers;
unsigned num,
struct pipe_sampler_view **);
+struct pipe_sampler_view *
+softpipe_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_texture *texture,
+ const struct pipe_sampler_view *templ);
+
+void
+softpipe_sampler_view_destroy(struct pipe_context *pipe,
+ struct pipe_sampler_view *view);
+
void softpipe_set_viewport_state( struct pipe_context *,
const struct pipe_viewport_state * );
}
+struct pipe_sampler_view *
+softpipe_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_texture *texture,
+ const struct pipe_sampler_view *templ)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+ struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view);
+
+ *view = *templ;
+ view->reference.count = 1;
+ view->texture = NULL;
+ pipe_texture_reference(&view->texture, texture);
+ view->context = pipe;
+
+ return view;
+}
+
+
+void
+softpipe_sampler_view_destroy(struct pipe_context *pipe,
+ struct pipe_sampler_view *view)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ pipe_texture_reference(&view->texture, NULL);
+ FREE(view);
+}
+
+
void
softpipe_set_sampler_views(struct pipe_context *pipe,
unsigned num,