Fix MSVC build error due to implicit descriptor heap offset cast.
BUG=dawn:233
Change-Id: Ia42d7e99df910f245b7c78be16b7916c0730e8a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11960
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/d3d12/DescriptorHeapAllocator.cpp b/src/dawn_native/d3d12/DescriptorHeapAllocator.cpp
index 29ccab7..a69641a 100644
--- a/src/dawn_native/d3d12/DescriptorHeapAllocator.cpp
+++ b/src/dawn_native/d3d12/DescriptorHeapAllocator.cpp
@@ -72,7 +72,8 @@
? RingBufferAllocator::kInvalidOffset
: heapInfo->allocator.Allocate(count, pendingSerial);
if (startOffset != RingBufferAllocator::kInvalidOffset) {
- return DescriptorHeapHandle{heapInfo->heap, mSizeIncrements[type], startOffset};
+ return DescriptorHeapHandle{heapInfo->heap, mSizeIncrements[type],
+ static_cast<uint32_t>(startOffset)};
}
// If the pool has no more space, replace the pool with a new one of the specified size