Module: Mesa Branch: master Commit: 26a83bef7b98899913b19ddb7efadaa1f435b25f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26a83bef7b98899913b19ddb7efadaa1f435b25f
Author: Thong Thai <[email protected]> Date: Tue Sep 15 18:55:45 2020 -0400 gallium/auxiliary/vl: Include src region in scale_y calculation Signed-off-by: Thong Thai <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3521 Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6736> --- src/gallium/auxiliary/vl/vl_compositor_cs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.c b/src/gallium/auxiliary/vl/vl_compositor_cs.c index 0706cc84dad..029449f9dd1 100644 --- a/src/gallium/auxiliary/vl/vl_compositor_cs.c +++ b/src/gallium/auxiliary/vl/vl_compositor_cs.c @@ -711,10 +711,12 @@ draw_layers(struct vl_compositor *c, drawn.area = calc_drawn_area(s, layer); drawn.scale_x = layer->viewport.scale[0] / - (float)layer->sampler_views[0]->texture->width0; + (float)layer->sampler_views[0]->texture->width0 * + (layer->src.br.x - layer->src.tl.x); drawn.scale_y = layer->viewport.scale[1] / ((float)layer->sampler_views[0]->texture->height0 * - (s->interlaced ? 2.0 : 1.0)); + (s->interlaced ? 2.0 : 1.0) * + (layer->src.br.y - layer->src.tl.y)); drawn.translate_x = (int)layer->viewport.translate[0]; drawn.translate_y = (int)layer->viewport.translate[1]; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
