radeonsi: Don't save/restore FMASK sampler view states for u_blitter
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 30 Aug 2013 15:45:31 +0000 (17:45 +0200)
committerMichel Dänzer <michel@daenzer.net>
Mon, 2 Sep 2013 15:25:27 +0000 (17:25 +0200)
Fixes assertion failues in 24 piglit tests with
MESA_GL_VERSION_OVERRIDE=3.0, 12 of which are now passing.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/r600_blit.c

index 92b5a153ec315ca94abcc2f47d78d461a5e45797..20c1767fff0448d94b3a683edf83e02ff577329d 100644 (file)
@@ -76,7 +76,8 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
                        (void**)rctx->samplers[PIPE_SHADER_FRAGMENT].samplers);
 
                util_blitter_save_fragment_sampler_views(rctx->blitter,
-                       util_last_bit(rctx->samplers[PIPE_SHADER_FRAGMENT].views.desc.enabled_mask),
+                       util_last_bit(rctx->samplers[PIPE_SHADER_FRAGMENT].views.desc.enabled_mask &
+                                     ((1 << NUM_TEX_UNITS) - 1)),
                        rctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
        }