Fix MSVC compilation failure because of implicit conversions
This patch fixed compile error because of implicit conversions when is_clang = false. BUG=dawn:151 Change-Id: Id94f3f62147962cb73be0d0688ef03b2811d863c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7380 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
c0c7e2f85b
commit
18672ef994
|
@ -486,8 +486,8 @@ TEST_P(VertexFormatTest, UChar2Norm) {
|
|||
std::numeric_limits<uint8_t>::min(),
|
||||
0, // padding two bytes for stride
|
||||
0,
|
||||
std::numeric_limits<uint8_t>::max() / 2,
|
||||
std::numeric_limits<uint8_t>::min() / 2,
|
||||
std::numeric_limits<uint8_t>::max() / 2u,
|
||||
std::numeric_limits<uint8_t>::min() / 2u,
|
||||
0, // padding two bytes for stride
|
||||
0,
|
||||
200,
|
||||
|
@ -498,8 +498,8 @@ TEST_P(VertexFormatTest, UChar2Norm) {
|
|||
|
||||
std::vector<uint8_t> expectedData = {std::numeric_limits<uint8_t>::max(),
|
||||
std::numeric_limits<uint8_t>::min(),
|
||||
std::numeric_limits<uint8_t>::max() / 2,
|
||||
std::numeric_limits<uint8_t>::min() / 2,
|
||||
std::numeric_limits<uint8_t>::max() / 2u,
|
||||
std::numeric_limits<uint8_t>::min() / 2u,
|
||||
200,
|
||||
201};
|
||||
|
||||
|
@ -511,8 +511,8 @@ TEST_P(VertexFormatTest, UChar4Norm) {
|
|||
std::numeric_limits<uint8_t>::min(),
|
||||
0,
|
||||
0,
|
||||
std::numeric_limits<uint8_t>::max() / 2,
|
||||
std::numeric_limits<uint8_t>::min() / 2,
|
||||
std::numeric_limits<uint8_t>::max() / 2u,
|
||||
std::numeric_limits<uint8_t>::min() / 2u,
|
||||
0,
|
||||
0,
|
||||
200,
|
||||
|
@ -631,8 +631,8 @@ TEST_P(VertexFormatTest, Short4) {
|
|||
TEST_P(VertexFormatTest, UShort2Norm) {
|
||||
std::vector<uint16_t> vertexData = {std::numeric_limits<uint16_t>::max(),
|
||||
std::numeric_limits<uint16_t>::min(),
|
||||
std::numeric_limits<uint16_t>::max() / 2,
|
||||
std::numeric_limits<uint16_t>::min() / 2,
|
||||
std::numeric_limits<uint16_t>::max() / 2u,
|
||||
std::numeric_limits<uint16_t>::min() / 2u,
|
||||
3456,
|
||||
6543};
|
||||
|
||||
|
@ -644,8 +644,8 @@ TEST_P(VertexFormatTest, UShort4Norm) {
|
|||
std::numeric_limits<uint16_t>::min(),
|
||||
0,
|
||||
0,
|
||||
std::numeric_limits<uint16_t>::max() / 2,
|
||||
std::numeric_limits<uint16_t>::min() / 2,
|
||||
std::numeric_limits<uint16_t>::max() / 2u,
|
||||
std::numeric_limits<uint16_t>::min() / 2u,
|
||||
0,
|
||||
0,
|
||||
2987,
|
||||
|
@ -686,14 +686,14 @@ TEST_P(VertexFormatTest, Short4Norm) {
|
|||
|
||||
TEST_P(VertexFormatTest, Half2) {
|
||||
std::vector<uint16_t> vertexData =
|
||||
Float32ToFloat16(std::vector<float>({14.8, -0.0, 22.5, 1.3, +0.0, -24.8}));
|
||||
Float32ToFloat16(std::vector<float>({14.8f, -0.0f, 22.5f, 1.3f, +0.0f, -24.8f}));
|
||||
|
||||
DoVertexFormatTest(dawn::VertexFormat::Half2, vertexData, vertexData);
|
||||
}
|
||||
|
||||
TEST_P(VertexFormatTest, Half4) {
|
||||
std::vector<uint16_t> vertexData = Float32ToFloat16(std::vector<float>(
|
||||
{+0.0, -16.8, 18.2, -0.0, 12.5, 1.3, 14.8, -12.4, 22.5, -48.8, 47.4, -24.8}));
|
||||
{+0.0f, -16.8f, 18.2f, -0.0f, 12.5f, 1.3f, 14.8f, -12.4f, 22.5f, -48.8f, 47.4f, -24.8f}));
|
||||
|
||||
DoVertexFormatTest(dawn::VertexFormat::Half4, vertexData, vertexData);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue