mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
vk: Clamp buffer row length to never be less than declared width
- Fixes some games with broken textures
This commit is contained in:
parent
2408922806
commit
c415578e79
1 changed files with 1 additions and 1 deletions
|
@ -736,7 +736,7 @@ namespace vk
|
||||||
copy_info.imageSubresource.layerCount = 1;
|
copy_info.imageSubresource.layerCount = 1;
|
||||||
copy_info.imageSubresource.baseArrayLayer = layout.layer;
|
copy_info.imageSubresource.baseArrayLayer = layout.layer;
|
||||||
copy_info.imageSubresource.mipLevel = layout.level;
|
copy_info.imageSubresource.mipLevel = layout.level;
|
||||||
copy_info.bufferRowLength = block_in_pixel * row_pitch / block_size_in_bytes;
|
copy_info.bufferRowLength = std::max<u32>(block_in_pixel * row_pitch / block_size_in_bytes, layout.width_in_texel);
|
||||||
|
|
||||||
if (opt.require_swap || opt.require_deswizzle || dst_image->aspect() & VK_IMAGE_ASPECT_STENCIL_BIT)
|
if (opt.require_swap || opt.require_deswizzle || dst_image->aspect() & VK_IMAGE_ASPECT_STENCIL_BIT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue