u_blitter/stencil: take dstbox x/y into accounts for dst fb width

When setting the dst framebuffer width height, it might be silly
to constrain this beyond the dst resource, but at least constrain
it correctly to take account of x/y offsets.

This fixes some uses of this as a fallback for zink with
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_stencil_blit

Fixes: b4c07a8a87 ("gallium/util: allow scaling blits for stencil-fallback")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16069>
This commit is contained in:
Dave Airlie 2022-04-21 09:49:31 +10:00 committed by Marge Bot
parent e0e5cbd5a4
commit dbc264f504

View file

@ -2937,8 +2937,8 @@ util_blitter_stencil_fallback(struct blitter_context *blitter,
/* set a framebuffer state */
struct pipe_framebuffer_state fb_state = { 0 };
fb_state.width = dstbox->width;
fb_state.height = dstbox->height;
fb_state.width = dstbox->x + dstbox->width;
fb_state.height = dstbox->y + dstbox->height;
fb_state.zsbuf = dst_view;
pipe->set_framebuffer_state(pipe, &fb_state);
pipe->set_sample_mask(pipe, ~0);