vk: Simplify WCB heuristics and fix out-of-bounds access

This commit is contained in:
kd-11 2019-06-12 14:41:17 +03:00 committed by kd-11
parent 86119f58d6
commit 4104d7a6a1

View file

@ -208,9 +208,6 @@ namespace vk
locked_resource->push_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); locked_resource->push_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
real_pitch = vk::get_format_texel_width(locked_resource->info.format) * locked_resource->width(); real_pitch = vk::get_format_texel_width(locked_resource->info.format) * locked_resource->width();
if ((rsx::get_resolution_scale_percent() != 100 && context == rsx::texture_upload_context::framebuffer_storage) ||
(real_pitch != rsx_pitch))
{
if (transfer_width != locked_resource->width() || transfer_height != locked_resource->height()) if (transfer_width != locked_resource->width() || transfer_height != locked_resource->height())
{ {
// TODO: Synchronize access to typeles textures // TODO: Synchronize access to typeles textures
@ -226,7 +223,6 @@ namespace vk
target->change_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); target->change_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
} }
}
verify(HERE), target->current_layout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; verify(HERE), target->current_layout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;