mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Change rowsPerImage units from texels to blocks
Spec change: https://github.com/gpuweb/gpuweb/pull/958 Bug: dawn:520 Change-Id: I05c4792a2832d12cd68877f2b1b99cdf9ef26925 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29981 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
51af1b428f
commit
d1bca09f4a
@@ -79,8 +79,7 @@ namespace utils {
|
||||
uint32_t blockWidth = utils::GetTextureFormatBlockWidth(textureFormat);
|
||||
uint32_t blockHeight = utils::GetTextureFormatBlockHeight(textureFormat);
|
||||
|
||||
uint64_t texelBlockRowsPerImage = rowsPerImage / blockHeight;
|
||||
uint64_t bytesPerImage = bytesPerRow * texelBlockRowsPerImage;
|
||||
uint64_t bytesPerImage = bytesPerRow * rowsPerImage;
|
||||
uint64_t bytesInLastSlice = bytesPerRow * (copyExtent.height / blockHeight - 1) +
|
||||
(copyExtent.width / blockWidth * blockSize);
|
||||
return bytesPerImage * (copyExtent.depth - 1) + bytesInLastSlice;
|
||||
@@ -112,4 +111,4 @@ namespace utils {
|
||||
device.GetDefaultQueue().WriteTexture(&textureCopyView, data.data(), 1, &textureDataLayout,
|
||||
©Extent);
|
||||
}
|
||||
} // namespace utils
|
||||
} // namespace utils
|
||||
|
||||
Reference in New Issue
Block a user