GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 4157723c authored by Thong Thai's avatar Thong Thai
Browse files

gallium/auxiliary/vl: Include src region in scale_y calculation


Signed-off-by: Thong Thai's avatarThong Thai <thong.thai@amd.com>
Closes: mesa/mesa#3521

Reviewed-by: Leo Liu's avatarLeo Liu <leo.liu@amd.com>
Part-of: <mesa/mesa!6736>
Cc: 20.2 <mesa-stable>
parent 87bfed33
Pipeline #248458 waiting for manual action with stages
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment