gpu: cache: fix image offset

This commit is contained in:
DH 2024-11-01 16:37:03 +03:00
parent 2dbbabedd3
commit 410683ef36

View file

@ -1006,7 +1006,7 @@ struct CachedImage : Cache::Entry {
++mipLevel) {
auto &mipInfo = info.getSubresourceInfo(mipLevel);
regions.push_back({
.bufferOffset = mipInfo.tiledOffset + imageBuffer.offset,
.bufferOffset = imageBuffer.offset + mipInfo.linearOffset,
.bufferRowLength =
mipLevel > 0 ? 0 : std::max(imageBufferKey.pitch >> mipLevel, 1u),
.imageSubresource =