From: Thong Thai Date: Fri, 15 May 2020 18:07:05 +0000 (-0400) Subject: gallium/auxiliary/vl: Fix compute shader scaling for non-square pixels X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=494b7ef0c1a440c57f5a6a8a301fba4f7e551417;p=mesa.git 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 Reviewed-by: Marek Olšák Part-of: --- 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;