From 3209df5a9cc2de5415688653d1142b1adda554db Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 17 Mar 2021 08:03:39 +0000 Subject: [PATCH] Fix TimestampQueryTests BUG=dawn:713 Change-Id: Ice1f9d948125daa68de661ad37bb07835ef9bec8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44940 Auto-Submit: Ryan Harrison Commit-Queue: Corentin Wallez Reviewed-by: Corentin Wallez --- src/dawn_native/QueryHelper.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dawn_native/QueryHelper.cpp b/src/dawn_native/QueryHelper.cpp index 048e279f65..4921c081cc 100644 --- a/src/dawn_native/QueryHelper.cpp +++ b/src/dawn_native/QueryHelper.cpp @@ -87,15 +87,15 @@ namespace dawn_native { if (timestamp.low <= u32(f32(0xFFFFFFFFu) / period)) { timestamps.t[index].low = u32(round(f32(timestamp.low) * period)); } else { - var lo : u32 = timestamp.low & 0xFFFF; - var hi : u32 = timestamp.low >> 16; + var lo : u32 = timestamp.low & 0xFFFFu; + var hi : u32 = timestamp.low >> 16u; var t0 : u32 = u32(round(f32(lo) * period)); - var t1 : u32 = u32(round(f32(hi) * period)) + (t0 >> 16); - w = t1 >> 16; + var t1 : u32 = u32(round(f32(hi) * period)) + (t0 >> 16u); + w = t1 >> 16u; - var result : u32 = t1 << 16; - result = result | (t0 & 0xFFFF); + var result : u32 = t1 << 16u; + result = result | (t0 & 0xFFFFu); timestamps.t[index].low = result; }