GPU: Ensure texture resolves are at least 1x1.

This commit is contained in:
gibbed 2017-08-08 01:39:42 -05:00
parent d2d8d65629
commit 4a95862023
2 changed files with 4 additions and 2 deletions

View File

@ -93,6 +93,8 @@ bool TextureInfo::PrepareResolve(uint32_t physical_address,
auto& info = *out_info;
info.guest_address = physical_address;
info.dimension = Dimension::k2D;
assert_true(width > 0);
assert_true(height > 0);
info.width = width - 1;
info.height = height - 1;
info.texture_format = texture_format;

View File

@ -1012,8 +1012,8 @@ bool VulkanCommandProcessor::IssueCopy() {
// Demand a resolve texture from the texture cache.
TextureInfo texture_info;
TextureInfo::PrepareResolve(copy_dest_base, copy_dest_format, resolve_endian,
dest_logical_width, dest_logical_height,
&texture_info);
dest_logical_width,
std::max(1u, dest_logical_height), &texture_info);
auto texture =
texture_cache_->DemandResolveTexture(texture_info, copy_dest_format);