rsx: Fix image scaling

- Specifically fixes a corner case where double transforms are required.
  Technically this can be made more readable using transformation matrices:
  * M1 = transform_virtual_to_physical()
  * M2 = transform_image_to_virtual()
  * M3 = M1 * M2
  * Result = Input * M3
  But we don't use a CPU-side matrix library and it is not reasonable to do this on the GPU.
This commit is contained in:
kd-11 2021-11-09 23:06:52 +03:00 committed by Megamouse
parent c8d4a0dcdc
commit 22a7b026e7
5 changed files with 100 additions and 73 deletions

View file

@ -165,8 +165,8 @@ namespace rsx
u8 get_bpp() const;
double get_aspect_ratio() const;
void upscale_to_aspect_ratio(int& width, int& height) const;
void downscale_to_aspect_ratio(int& x, int& y, int& width, int& height) const;
areau aspect_convert_region(const size2u& image_dimensions, const size2u& output_dimensions) const;
size2u aspect_convert_dimensions(const size2u& image_dimensions) const;
};
struct blit_src_info