summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c')
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
index ec1572646..b6a97c13c 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -41,7 +41,7 @@
#include "sp_tex_sample.h"
#include "sp_tex_tile_cache.h"
#include "sp_screen.h"
-#include "state_tracker/sw_winsys.h"
+#include "frontend/sw_winsys.h"
/**
@@ -100,6 +100,7 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
enum pipe_shader_type shader,
unsigned start,
unsigned num,
+ unsigned unbind_num_trailing_slots,
struct pipe_sampler_view **views)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -134,6 +135,12 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
memset(sp_sviewdst, 0, sizeof(*sp_sviewsrc));
}
}
+ for (; i < num + unbind_num_trailing_slots; i++) {
+ struct pipe_sampler_view **pview = &softpipe->sampler_views[shader][start + i];
+ pipe_sampler_view_reference(pview, NULL);
+ sp_tex_tile_cache_set_sampler_view(softpipe->tex_cache[shader][start + i],
+ NULL);
+ }
/* find highest non-null sampler_views[] entry */
@@ -254,7 +261,7 @@ prepare_shader_sampling(
struct softpipe_screen *screen = softpipe_screen(tex->screen);
struct sw_winsys *winsys = screen->winsys;
addr = winsys->displaytarget_map(winsys, sp_tex->dt,
- PIPE_TRANSFER_READ);
+ PIPE_MAP_READ);
row_stride[0] = sp_tex->stride[0];
img_stride[0] = sp_tex->img_stride[0];
mip_offsets[0] = 0;
@@ -264,7 +271,7 @@ prepare_shader_sampling(
shader_type,
i,
width0, tex->height0, num_layers,
- first_level, last_level,
+ first_level, last_level, 0, 0,
addr,
row_stride, img_stride, mip_offsets);
}