setup->dirty |= LP_SETUP_NEW_SCISSOR;
}
+void
+lp_setup_set_sample_mask(struct lp_setup_context *setup,
+ uint32_t sample_mask)
+{
+ if (setup->fs.current.jit_context.sample_mask != sample_mask) {
+ setup->fs.current.jit_context.sample_mask = sample_mask;
+ setup->dirty |= LP_SETUP_NEW_FS;
+ }
+}
void
lp_setup_set_flatshade_first(struct lp_setup_context *setup,
lp_setup_is_resource_referenced( const struct lp_setup_context *setup,
const struct pipe_resource *texture );
+void
+lp_setup_set_sample_mask(struct lp_setup_context *setup,
+ uint32_t sample_mask);
+
void
lp_setup_set_flatshade_first( struct lp_setup_context *setup,
boolean flatshade_first );
#define LP_NEW_FS_IMAGES 0x100000
#define LP_NEW_TCS 0x200000
#define LP_NEW_TES 0x400000
+#define LP_NEW_SAMPLE_MASK 0x800000
#define LP_CSNEW_CS 0x1
#define LP_CSNEW_CONSTANTS 0x2
if (sample_mask != llvmpipe->sample_mask) {
llvmpipe->sample_mask = sample_mask;
- llvmpipe->dirty |= LP_NEW_RASTERIZER;
+ llvmpipe->dirty |= LP_NEW_SAMPLE_MASK;
}
}
llvmpipe->pipe.set_stencil_ref = llvmpipe_set_stencil_ref;
llvmpipe->pipe.set_sample_mask = llvmpipe_set_sample_mask;
+ llvmpipe->dirty |= LP_NEW_SAMPLE_MASK;
llvmpipe->sample_mask = ~0;
}
if (llvmpipe->dirty & (LP_NEW_FS |
LP_NEW_FRAMEBUFFER |
LP_NEW_RASTERIZER |
+ LP_NEW_SAMPLE_MASK |
LP_NEW_DEPTH_STENCIL_ALPHA)) {
/*
boolean null_fs = !llvmpipe->fs ||
llvmpipe->fs->info.base.num_instructions <= 1;
boolean discard =
- (llvmpipe->sample_mask & 1) == 0 ||
+ (llvmpipe->sample_mask) == 0 ||
(llvmpipe->rasterizer ? llvmpipe->rasterizer->rasterizer_discard : FALSE) ||
(null_fs &&
!llvmpipe->depth_stencil->depth.enabled &&
LP_NEW_RASTERIZER))
llvmpipe_update_setup( llvmpipe );
+ if (llvmpipe->dirty & LP_NEW_SAMPLE_MASK)
+ lp_setup_set_sample_mask(llvmpipe->setup, llvmpipe->sample_mask);
+
if (llvmpipe->dirty & LP_NEW_BLEND_COLOR)
lp_setup_set_blend_color(llvmpipe->setup,
&llvmpipe->blend_color);
util_blitter_save_tesseval_shader(lp->blitter, (void*)lp->tes);
util_blitter_save_depth_stencil_alpha(lp->blitter, (void*)lp->depth_stencil);
util_blitter_save_stencil_ref(lp->blitter, &lp->stencil_ref);
- /*util_blitter_save_sample_mask(sp->blitter, lp->sample_mask);*/
+ util_blitter_save_sample_mask(lp->blitter, lp->sample_mask);
util_blitter_save_framebuffer(lp->blitter, &lp->framebuffer);
util_blitter_save_fragment_sampler_states(lp->blitter,
lp->num_samplers[PIPE_SHADER_FRAGMENT],