Bubble up potential errors during buffer.unmap().

Bug: dawn:1336
Change-Id: I715904874311349b4e996665dccc9d2d31959717
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122022
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
Loko Kung
2023-02-28 19:02:00 +00:00
committed by Dawn LUCI CQ
parent c2683a9459
commit f93f7ae8b1
5 changed files with 20 additions and 13 deletions

View File

@@ -498,7 +498,7 @@ MaybeError Texture::ClearTexture(const SubresourceRange& range,
// Fill the buffer with clear color
memset(srcBuffer->GetMappedRange(0, bufferSize), clearColor, bufferSize);
srcBuffer->Unmap();
DAWN_TRY(srcBuffer->Unmap());
gl.BindBuffer(GL_PIXEL_UNPACK_BUFFER, srcBuffer->GetHandle());
for (uint32_t level = range.baseMipLevel; level < range.baseMipLevel + range.levelCount;