diff --git a/.pick_status.json b/.pick_status.json index 4aa5a0b0097..9c88a417566 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -54,7 +54,7 @@ "description": "util/blitter: iterate samples in stencil_fallback", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index f4a0a2f898b..be24ec084aa 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -2952,33 +2952,36 @@ util_blitter_stencil_fallback(struct blitter_context *blitter, struct pipe_stencil_ref sr = { { (1u << stencil_bits) - 1 } }; pipe->set_stencil_ref(pipe, sr); - union blitter_attrib coord; - get_texcoords(src_view, src->width0, src->height0, - srcbox->x, srcbox->y, - srcbox->x + srcbox->width, srcbox->y + srcbox->height, - srcbox->z, 0, true, - &coord); + for (unsigned i = 0; i <= util_res_sample_count(dst) - 1; i++) { + pipe->set_sample_mask(pipe, 1 << i); + union blitter_attrib coord; + get_texcoords(src_view, src->width0, src->height0, + srcbox->x, srcbox->y, + srcbox->x + srcbox->width, srcbox->y + srcbox->height, + srcbox->z, i, true, + &coord); - for (int i = 0; i < stencil_bits; ++i) { - uint32_t mask = 1 << i; - struct pipe_constant_buffer cb = { - .user_buffer = &mask, - .buffer_size = sizeof(mask), - }; - pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, blitter->cb_slot, - false, &cb); + for (int i = 0; i < stencil_bits; ++i) { + uint32_t mask = 1 << i; + struct pipe_constant_buffer cb = { + .user_buffer = &mask, + .buffer_size = sizeof(mask), + }; + pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, blitter->cb_slot, + false, &cb); - pipe->bind_depth_stencil_alpha_state(pipe, - get_stencil_blit_fallback_dsa(ctx, i)); + pipe->bind_depth_stencil_alpha_state(pipe, + get_stencil_blit_fallback_dsa(ctx, i)); - blitter->draw_rectangle(blitter, ctx->velem_state, - get_vs_passthrough_pos_generic, - dstbox->x, dstbox->y, - dstbox->x + dstbox->width, - dstbox->y + dstbox->height, - 0, 1, - UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW, - &coord); + blitter->draw_rectangle(blitter, ctx->velem_state, + get_vs_passthrough_pos_generic, + dstbox->x, dstbox->y, + dstbox->x + dstbox->width, + dstbox->y + dstbox->height, + 0, 1, + UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW, + &coord); + } } if (scissor)