[GPU] Unconditionally multiply in src.depth in GetMipByteSize (always valid)

This commit is contained in:
Dr. Chat 2018-05-13 13:58:34 -05:00
parent 0a971462d7
commit 1953cea64e
1 changed files with 1 additions and 18 deletions

View File

@ -464,24 +464,7 @@ uint32_t TextureInfo::GetMipByteSize(const TextureInfo& src, uint32_t mip) {
byte_pitch = xe::round_up(byte_pitch, 256);
}
uint32_t size = byte_pitch * block_height;
switch (src.dimension) {
case Dimension::k1D:
case Dimension::k2D:
break;
case Dimension::k3D:
size *= src.depth;
break;
case Dimension::kCube:
size *= 6;
break;
default:
assert_unhandled_case(src.dimension);
break;
}
return size;
return byte_pitch * block_height * (src.depth + 1);
}
uint32_t TextureInfo::GetMipLinearSize(const TextureInfo& src, uint32_t mip) {