Module: Mesa Branch: master Commit: 494b7ef0c1a440c57f5a6a8a301fba4f7e551417 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=494b7ef0c1a440c57f5a6a8a301fba4f7e551417
Author: Thong Thai <[email protected]> Date: Fri May 15 14:07:05 2020 -0400 gallium/auxiliary/vl: Fix compute shader scaling for non-square pixels Calculate the scale_y parameter instead of assuming square pixels. Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5057> --- src/gallium/auxiliary/vl/vl_compositor_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.c b/src/gallium/auxiliary/vl/vl_compositor_cs.c index eb19dd7b159..bc2055bd3e1 100644 --- a/src/gallium/auxiliary/vl/vl_compositor_cs.c +++ b/src/gallium/auxiliary/vl/vl_compositor_cs.c @@ -712,7 +712,8 @@ 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; - drawn.scale_y = drawn.scale_x; + drawn.scale_y = layer->viewport.scale[1] / + (float)layer->sampler_views[0]->texture->height0; drawn.translate_x = (int)layer->viewport.translate[0]; drawn.translate_y = (int)layer->viewport.translate[1]; drawn.sampler0_w = (float)layer->sampler_views[0]->texture->width0; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
