diff options
author | Michal Krol <michal@vmware.com> | 2010-02-23 16:37:42 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2010-02-23 16:37:42 +0100 |
commit | eb9c9efedf9e0b1fdb000a3d175285764759af2a (patch) | |
tree | 2b20368b7939bcbb52b9b492368346f3eb1f8888 /src/gallium/drivers/softpipe/sp_state_sampler.c | |
parent | 14a146c4995da5074eb1192a818b7a3dfc3bb438 (diff) | |
download | external_mesa3d-eb9c9efedf9e0b1fdb000a3d175285764759af2a.zip external_mesa3d-eb9c9efedf9e0b1fdb000a3d175285764759af2a.tar.gz external_mesa3d-eb9c9efedf9e0b1fdb000a3d175285764759af2a.tar.bz2 |
softpipe: Fix after sampler view changes.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_sampler.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index c985b5c..5a92e22 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -121,6 +121,35 @@ softpipe_bind_vertex_sampler_states(struct pipe_context *pipe, } +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, |