mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
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 <thong.thai@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5057>
This commit is contained in:
parent
fd6a5e112a
commit
494b7ef0c1
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue