diff --git a/src/dawn_native/d3d12/BufferD3D12.cpp b/src/dawn_native/d3d12/BufferD3D12.cpp index 9cfc536a20..ff21dd047e 100644 --- a/src/dawn_native/d3d12/BufferD3D12.cpp +++ b/src/dawn_native/d3d12/BufferD3D12.cpp @@ -229,7 +229,7 @@ namespace dawn_native { namespace d3d12 { } MaybeError Buffer::MapAtCreationImpl(uint8_t** mappedPointer) { - mWrittenMappedRange = {0, GetSize()}; + mWrittenMappedRange = {0, static_cast(GetSize())}; DAWN_TRY(CheckHRESULT(GetD3D12Resource()->Map(0, &mWrittenMappedRange, reinterpret_cast(mappedPointer)), "D3D12 map at creation")); @@ -238,7 +238,7 @@ namespace dawn_native { namespace d3d12 { MaybeError Buffer::MapReadAsyncImpl(uint32_t serial) { mWrittenMappedRange = {}; - D3D12_RANGE readRange = {0, GetSize()}; + D3D12_RANGE readRange = {0, static_cast(GetSize())}; char* data = nullptr; DAWN_TRY( CheckHRESULT(GetD3D12Resource()->Map(0, &readRange, reinterpret_cast(&data)), @@ -251,7 +251,7 @@ namespace dawn_native { namespace d3d12 { } MaybeError Buffer::MapWriteAsyncImpl(uint32_t serial) { - mWrittenMappedRange = {0, GetSize()}; + mWrittenMappedRange = {0, static_cast(GetSize())}; char* data = nullptr; DAWN_TRY(CheckHRESULT( GetD3D12Resource()->Map(0, &mWrittenMappedRange, reinterpret_cast(&data)), diff --git a/src/tests/end2end/WindowSurfaceTests.cpp b/src/tests/end2end/WindowSurfaceTests.cpp index beb301b592..779622e98d 100644 --- a/src/tests/end2end/WindowSurfaceTests.cpp +++ b/src/tests/end2end/WindowSurfaceTests.cpp @@ -19,14 +19,16 @@ #include "utils/GLFWUtils.h" #include -#include "GLFW/glfw3.h" #include +// Include windows.h before GLFW so GLFW's APIENTRY macro doesn't conflict with windows.h's. #if defined(DAWN_PLATFORM_WINDOWS) # include "common/windows_with_undefs.h" #endif // defined(DAWN_PLATFORM_WINDOWS) +#include "GLFW/glfw3.h" + #if defined(DAWN_USE_X11) # include "common/xlib_with_undefs.h" #endif // defined(DAWN_USE_X11)