aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-14 11:11:28 +0200
committermarha <marha@users.sourceforge.net>2012-09-14 11:11:28 +0200
commitc0212d660fe99ea5e4a1b897670f7f7c111553c7 (patch)
tree12c04842a73bb885640f1e23ef9a3ca654d09c5a /mesalib/src/gallium
parentf61137c5cf42ded5eeb85eaf007ae11f0811e022 (diff)
parentb08ba56019b146786e1cde553c036dd0c4fd02e5 (diff)
downloadvcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.tar.gz
vcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.tar.bz2
vcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/gallium')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index 44295c136..35b8edba7 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -1213,6 +1213,21 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
pipe->bind_fragment_sampler_states(pipe, 2, samplers);
pipe_sampler_view_reference(&views[1], NULL);
+ } else if (blit_stencil) {
+ /* Set a stencil-only sampler view for it not to sample depth instead. */
+ struct pipe_sampler_view templ;
+ struct pipe_sampler_view *view;
+
+ templ = *src;
+ templ.format = util_format_stencil_only(templ.format);
+ assert(templ.format != PIPE_FORMAT_NONE);
+
+ view = pipe->create_sampler_view(pipe, src->texture, &templ);
+
+ pipe->set_fragment_sampler_views(pipe, 1, &view);
+ pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state);
+
+ pipe_sampler_view_reference(&view, NULL);
} else {
pipe->set_fragment_sampler_views(pipe, 1, &src);
pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state);