gallium/auxiliary/vl: Fix compute shader scaling for non-square pixels
[mesa.git] / src / gallium / auxiliary / vl / vl_compositor_cs.c
index eb19dd7b15992861a3a020d65d51914b2dd08777..bc2055bd3e1e73fd28addb39a104316ffdf2db7a 100644 (file)
@@ -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;