mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-09 00:12:45 +01:00
fermi_2d: Fix surface copy block height.
This commit is contained in:
parent
3d9126ba87
commit
f87ea8fa8b
2 changed files with 7 additions and 2 deletions
|
@ -59,12 +59,12 @@ void Fermi2D::HandleSurfaceCopy() {
|
||||||
// If the input is tiled and the output is linear, deswizzle the input and copy it over.
|
// If the input is tiled and the output is linear, deswizzle the input and copy it over.
|
||||||
Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel,
|
Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel,
|
||||||
dst_bytes_per_pixel, src_buffer, dst_buffer, true,
|
dst_bytes_per_pixel, src_buffer, dst_buffer, true,
|
||||||
regs.src.block_height);
|
regs.src.BlockHeight());
|
||||||
} else {
|
} else {
|
||||||
// If the input is linear and the output is tiled, swizzle the input and copy it over.
|
// If the input is linear and the output is tiled, swizzle the input and copy it over.
|
||||||
Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel,
|
Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel,
|
||||||
dst_bytes_per_pixel, dst_buffer, src_buffer, false,
|
dst_bytes_per_pixel, dst_buffer, src_buffer, false,
|
||||||
regs.dst.block_height);
|
regs.dst.BlockHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,11 @@ public:
|
||||||
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
|
||||||
address_low);
|
address_low);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 BlockHeight() const {
|
||||||
|
// The block height is stored in log2 format.
|
||||||
|
return 1 << block_height;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size");
|
static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue