Fix 64 to 32 bit narrowing in dawn::wire

Bug: dawn:1377
Change-Id: I310daeb99de986389e79282b99006e95964149ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87671
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2022-04-27 20:02:03 +00:00 committed by Dawn LUCI CQ
parent 79c217ba36
commit 5441f45b41
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ namespace dawn::wire::server {
} }
} }
cmd.featuresCount = features.size(); cmd.featuresCount = static_cast<uint32_t>(features.size());
cmd.features = features.data(); cmd.features = features.data();
WGPUSupportedLimits limits = {}; WGPUSupportedLimits limits = {};

View File

@ -86,7 +86,7 @@ namespace dawn::wire::server {
// Hide features the wire cannot support. // Hide features the wire cannot support.
auto it = std::partition(features.begin(), features.end(), IsFeatureSupported); auto it = std::partition(features.begin(), features.end(), IsFeatureSupported);
cmd.featuresCount = std::distance(features.begin(), it); cmd.featuresCount = static_cast<uint32_t>(std::distance(features.begin(), it));
cmd.features = features.data(); cmd.features = features.data();
mProcs.adapterGetProperties(adapter, &properties); mProcs.adapterGetProperties(adapter, &properties);