mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Fix surface split logic
- Calculations are supposed to be done based on the properties of the outgoing surface
This commit is contained in:
parent
67dac94704
commit
be98554b40
1 changed files with 3 additions and 2 deletions
|
@ -122,6 +122,7 @@ namespace rsx
|
||||||
size2u old, _new;
|
size2u old, _new;
|
||||||
|
|
||||||
const auto prev_area = prev_surface->get_normalized_memory_area();
|
const auto prev_area = prev_surface->get_normalized_memory_area();
|
||||||
|
const auto prev_bpp = prev_surface->get_bpp();
|
||||||
old.width = prev_area.x2;
|
old.width = prev_area.x2;
|
||||||
old.height = prev_area.y2;
|
old.height = prev_area.y2;
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ namespace rsx
|
||||||
{
|
{
|
||||||
// Split in X
|
// Split in X
|
||||||
const u32 baseaddr = address + _new.width;
|
const u32 baseaddr = address + _new.width;
|
||||||
const u32 bytes_to_texels_x = (bpp * prev_surface->samples_x);
|
const u32 bytes_to_texels_x = (prev_bpp * prev_surface->samples_x);
|
||||||
|
|
||||||
deferred_clipped_region<surface_type> copy;
|
deferred_clipped_region<surface_type> copy;
|
||||||
copy.src_x = _new.width / bytes_to_texels_x;
|
copy.src_x = _new.width / bytes_to_texels_x;
|
||||||
|
@ -160,7 +161,7 @@ namespace rsx
|
||||||
{
|
{
|
||||||
// Split in Y
|
// Split in Y
|
||||||
const u32 baseaddr = address + (_new.height * prev_surface->get_rsx_pitch());
|
const u32 baseaddr = address + (_new.height * prev_surface->get_rsx_pitch());
|
||||||
const u32 bytes_to_texels_x = (bpp * prev_surface->samples_x);
|
const u32 bytes_to_texels_x = (prev_bpp * prev_surface->samples_x);
|
||||||
|
|
||||||
deferred_clipped_region<surface_type> copy;
|
deferred_clipped_region<surface_type> copy;
|
||||||
copy.src_x = 0;
|
copy.src_x = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue