Rename Buffer/TextureCopyView to ImageCopyBuffer/Texture.

This is to follow the renames in the upstream WebGPU specification.
Typedef are left in places to make a smooth deprecation period.

Bug: dawn:22

Change-Id: I5134b897930c1fa883c49dd80d2665d6684ec022
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43882
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Corentin Wallez
2021-03-04 18:13:45 +00:00
committed by Commit Bot service account
parent 2015b2f169
commit 80915849ce
45 changed files with 502 additions and 483 deletions

View File

@@ -72,12 +72,13 @@ void initTextures() {
wgpu::Buffer stagingBuffer = utils::CreateBufferFromData(
device, data.data(), static_cast<uint32_t>(data.size()), wgpu::BufferUsage::CopySrc);
wgpu::BufferCopyView bufferCopyView = utils::CreateBufferCopyView(stagingBuffer, 0, 4 * 1024);
wgpu::TextureCopyView textureCopyView = utils::CreateTextureCopyView(texture, 0, {0, 0, 0});
wgpu::ImageCopyBuffer imageCopyBuffer =
utils::CreateImageCopyBuffer(stagingBuffer, 0, 4 * 1024);
wgpu::ImageCopyTexture imageCopyTexture = utils::CreateImageCopyTexture(texture, 0, {0, 0, 0});
wgpu::Extent3D copySize = {1024, 1024, 1};
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
encoder.CopyBufferToTexture(&bufferCopyView, &textureCopyView, &copySize);
encoder.CopyBufferToTexture(&imageCopyBuffer, &imageCopyTexture, &copySize);
wgpu::CommandBuffer copy = encoder.Finish();
queue.Submit(1, &copy);