Title: [291447] trunk/Source/WebGPU
Revision
291447
Author
mmaxfi...@apple.com
Date
2022-03-17 15:55:21 -0700 (Thu, 17 Mar 2022)

Log Message

[WebGPU] Fix the 32-bit build
https://bugs.webkit.org/show_bug.cgi?id=238053

Unreviewed.

* WebGPU/Buffer.mm:
(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::mapAsync):

Modified Paths

Diff

Modified: trunk/Source/WebGPU/ChangeLog (291446 => 291447)


--- trunk/Source/WebGPU/ChangeLog	2022-03-17 22:07:39 UTC (rev 291446)
+++ trunk/Source/WebGPU/ChangeLog	2022-03-17 22:55:21 UTC (rev 291447)
@@ -1,5 +1,16 @@
 2022-03-17  Myles C. Maxfield  <mmaxfi...@apple.com>
 
+        [WebGPU] Fix the 32-bit build
+        https://bugs.webkit.org/show_bug.cgi?id=238053
+
+        Unreviewed.
+
+        * WebGPU/Buffer.mm:
+        (WebGPU::Buffer::getMappedRange):
+        (WebGPU::Buffer::mapAsync):
+
+2022-03-17  Myles C. Maxfield  <mmaxfi...@apple.com>
+
         [WebGPU] Fix 32-bit build
         https://bugs.webkit.org/show_bug.cgi?id=238046
 

Modified: trunk/Source/WebGPU/WebGPU/Buffer.mm (291446 => 291447)


--- trunk/Source/WebGPU/WebGPU/Buffer.mm	2022-03-17 22:07:39 UTC (rev 291446)
+++ trunk/Source/WebGPU/WebGPU/Buffer.mm	2022-03-17 22:55:21 UTC (rev 291447)
@@ -213,7 +213,7 @@
     // FIXME: Use checked arithmetic.
     auto rangeSize = size;
     if (size == WGPU_WHOLE_MAP_SIZE)
-        rangeSize = std::max(static_cast<uint64_t>(0), m_size - static_cast<uint64_t>(offset));
+        rangeSize = static_cast<size_t>(std::max(static_cast<uint64_t>(0), m_size - static_cast<uint64_t>(offset)));
 
     // "If any of the following conditions are unsatisfied"
     if (!validateGetMappedRange(offset, rangeSize)) {
@@ -275,7 +275,7 @@
     // FIXME: Use checked arithmetic.
     auto rangeSize = size;
     if (size == WGPU_WHOLE_MAP_SIZE)
-        rangeSize = std::max(static_cast<uint64_t>(0), static_cast<uint64_t>(m_size - offset));
+        rangeSize = static_cast<size_t>(std::max(static_cast<uint64_t>(0), static_cast<uint64_t>(m_size - offset)));
 
     // "If any of the following conditions are unsatisfied:"
     if (!validateMapAsync(mode, offset, rangeSize)) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to