Fix compilation with stdlibc++ (instead of libc++)
Also fixes some warnings when compiling with GCC Bug: dawn:333 Change-Id: Ib597bb3b950476279a1e20e3556765ec9f1db697 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15960 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
d353ca0881
commit
e51f8dd09a
|
@ -17,6 +17,7 @@
|
|||
#include "dawn_wire/client/Client.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -192,6 +192,8 @@ namespace dawn_native {
|
|||
return DAWN_VALIDATION_ERROR("Buffer used in a submit while mapped");
|
||||
case BufferState::Unmapped:
|
||||
return {};
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -444,6 +446,8 @@ namespace dawn_native {
|
|||
return {};
|
||||
case BufferState::Destroyed:
|
||||
return DAWN_VALIDATION_ERROR("Buffer is destroyed");
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "dawn_platform/DawnPlatform.h"
|
||||
#include "dawn_platform/tracing/TraceEvent.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
|
||||
namespace dawn_native {
|
||||
|
|
|
@ -64,10 +64,8 @@ namespace dawn_native {
|
|||
return BackendType::OpenGL;
|
||||
case wgpu::BackendType::Vulkan:
|
||||
return BackendType::Vulkan;
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return BackendType::Null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,6 +79,8 @@ namespace dawn_native {
|
|||
return DeviceType::CPU;
|
||||
case wgpu::AdapterType::Unknown:
|
||||
return DeviceType::Unknown;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define DAWNNATIVE_ERRORDATA_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include "common/Assert.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace dawn_native {
|
||||
|
||||
static constexpr size_t kPayloadBits = 1;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include "dawn_native/Device.h"
|
||||
#include "dawn_native/ValidationUtils_autogen.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace dawn_native {
|
||||
// Helper functions
|
||||
namespace {
|
||||
|
|
|
@ -144,6 +144,8 @@ namespace dawn_native { namespace vulkan {
|
|||
return VK_FRONT_FACE_COUNTER_CLOCKWISE;
|
||||
case wgpu::FrontFace::CW:
|
||||
return VK_FRONT_FACE_CLOCKWISE;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,6 +157,8 @@ namespace dawn_native { namespace vulkan {
|
|||
return VK_CULL_MODE_FRONT_BIT;
|
||||
case wgpu::CullMode::Back:
|
||||
return VK_CULL_MODE_BACK_BIT;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue