gallium/u_blitter: allow using the single triangle for scaled blits too

This should be faster because 2 triangles are inefficient on the diagonal,
generating helper invocations and potentially extra memory loads from dst
because tiles aren't fully covered.

Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40633>
This commit is contained in:
Marek Olšák 2026-03-25 14:26:38 -04:00 committed by Marge Bot
parent 1f9bc71051
commit ea9a31cc8c

View file

@ -2246,8 +2246,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
* oversized triangle to the destination rect.
*/
struct pipe_scissor_state synth_scissor;
if (ctx->base.use_single_triangle && !scissor &&
filter == PIPE_TEX_FILTER_NEAREST) {
if (ctx->base.use_single_triangle && !scissor) {
synth_scissor.minx = MAX2(dstbox->x, 0);
synth_scissor.miny = MAX2(dstbox->y, 0);
synth_scissor.maxx = dstbox->x + dstbox->width;
@ -2261,8 +2260,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
blitter_set_common_draw_rect_state(ctx, scissor != NULL, dst_samples > 1);
ctx->single_triangle_active = ctx->base.use_single_triangle &&
(filter == PIPE_TEX_FILTER_NEAREST);
ctx->single_triangle_active = ctx->base.use_single_triangle;
do_blits(ctx, dst, dstbox, src, src_width0, src_height0,
srcbox, dst_has_depth || dst_has_stencil, use_txf, sample0_only,
dst_sample);