struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
struct pipe_context *pipe = ctx->base.pipe;
struct pipe_framebuffer_state fb_state;
+ bool msaa;
unsigned num_layers;
assert(dstsurf->texture);
fb_state.zsbuf = 0;
pipe->set_framebuffer_state(pipe, &fb_state);
pipe->set_sample_mask(pipe, ~0);
+ msaa = util_framebuffer_get_num_samples(&fb_state) > 1;
blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
num_layers = dstsurf->u.tex.last_layer - dstsurf->u.tex.first_layer + 1;
if (num_layers > 1 && ctx->has_layered) {
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false, msaa);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs_layered,
dstx, dsty, dstx+width, dsty+height, 0,
num_layers, UTIL_BLITTER_ATTRIB_COLOR, &attrib);
} else {
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false, msaa);
blitter->draw_rectangle(blitter, ctx->velem_state,
get_vs_passthrough_pos_generic,
dstx, dsty, dstx+width, dsty+height, 0,
pipe->set_framebuffer_state(pipe, &fb_state);
pipe->set_sample_mask(pipe, sample_mask);
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false,
+ util_framebuffer_get_num_samples(&fb_state) > 1);
blitter_set_dst_dimensions(ctx, zsurf->width, zsurf->height);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs_passthrough_pos,
0, 0, zsurf->width, zsurf->height, depth,
fb_state.zsbuf = NULL;
pipe->set_framebuffer_state(pipe, &fb_state);
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false,
+ util_framebuffer_get_num_samples(&fb_state) > 1);
blitter_set_dst_dimensions(ctx, src->width0, src->height0);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs_passthrough_pos,
0, 0, src->width0, src->height0,
pipe->set_framebuffer_state(pipe, &fb_state);
pipe->set_sample_mask(pipe, ~0);
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false,
+ util_framebuffer_get_num_samples(&fb_state) > 1);
blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs_passthrough_pos,
0, 0, dstsurf->width, dstsurf->height,
pipe->set_framebuffer_state(pipe, &fb_state);
pipe->set_sample_mask(pipe, ~0);
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false,
+ util_framebuffer_get_num_samples(&fb_state) > 1);
blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
blitter->draw_rectangle(blitter, ctx->velem_state, get_custom_vs,
0, 0, dstsurf->width, dstsurf->height,