Add offset and size to Get[Const]MappedRange.

Bug: dawn:445
Change-Id: I73758d95e61d1fbe69f328907a6170a1b27d785b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24983
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2020-07-17 18:50:37 +00:00
committed by Commit Bot service account
parent 4b7ca6bf96
commit f6e7044697
13 changed files with 225 additions and 61 deletions

View File

@@ -315,7 +315,7 @@ namespace dawn_native { namespace opengl {
Ref<Buffer> srcBuffer = AcquireRef(ToBackend(device->CreateBuffer(&descriptor)));
// Fill the buffer with clear color
memset(srcBuffer->GetMappedRange(), clearColor, descriptor.size);
memset(srcBuffer->GetMappedRange(0, descriptor.size), clearColor, descriptor.size);
srcBuffer->Unmap();
// Bind buffer and texture, and make the buffer to texture copy