зеркало из https://github.com/AvaloniaUI/angle.git
Fix and disable MSVC warnings
Needed because some warnings are no longer disabled after http://crrev.com/c/3189512. Also includes https://github.com/KhronosGroup/OpenCL-Headers/pull/179, needed after clang upgrade to llvmorg-14-init-5410-gd0473681 Bug: chromium:1257173 Change-Id: I4f844aa972362c488cb6d37244439e2126f2c1c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210629 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Родитель
161668b665
Коммит
66c89b0fe4
5
BUILD.gn
5
BUILD.gn
|
@ -224,7 +224,10 @@ config("extra_warnings") {
|
|||
}
|
||||
|
||||
if (angle_is_winuwp) {
|
||||
cflags += [ "/wd4447" ] # 'main' signature found without threading model.
|
||||
cflags += [
|
||||
"/wd4091", # keyword ignored on left of type when no variable is declared
|
||||
"/wd4447", # 'main' signature found without threading model.
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1395,7 +1395,9 @@ typedef union
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__)
|
||||
#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
|
||||
#elif defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__)
|
||||
#if _MSC_VER >=1500
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
|
|
@ -123,9 +123,9 @@ void main()
|
|||
EGL_TRUE,
|
||||
EGL_NONE,
|
||||
};
|
||||
EGLImageKHR image =
|
||||
eglCreateImageKHR(window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(mSourceTexture), attribs);
|
||||
EGLImageKHR image = eglCreateImageKHR(
|
||||
window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(static_cast<uintptr_t>(mSourceTexture)), attribs);
|
||||
ASSERT_EGL_SUCCESS();
|
||||
|
||||
glBindTexture(GL_TEXTURE_EXTERNAL_OES, mExternalTexture);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
// EXT_shader_framebuffer_fetch_non_coherent extensions.
|
||||
//
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "test_utils/ANGLETest.h"
|
||||
#include "test_utils/gl_raii.h"
|
||||
#include "util/EGLWindow.h"
|
||||
|
@ -294,6 +295,9 @@ class FramebufferFetchES31 : public ANGLETest
|
|||
return k310CoherentDifferent4AttachmentFS1;
|
||||
case GLSL310_4ATTACHMENT_DIFFERENT2:
|
||||
return k310CoherentDifferent4AttachmentFS2;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -314,6 +318,9 @@ class FramebufferFetchES31 : public ANGLETest
|
|||
return k310NonCoherentDifferent4AttachmentFS1;
|
||||
case GLSL310_4ATTACHMENT_DIFFERENT2:
|
||||
return k310NonCoherentDifferent4AttachmentFS2;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ TEST_P(ReadPixelsPBONVTest, ReadFromFBOWithDataOffset)
|
|||
|
||||
// Read (height - 1) rows offset by width * 4.
|
||||
glReadPixels(0, 0, mFBOWidth, mFBOHeight - 1, GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
reinterpret_cast<void *>(mFBOWidth * 4));
|
||||
reinterpret_cast<void *>(mFBOWidth * static_cast<uintptr_t>(4)));
|
||||
|
||||
void *mappedPtr =
|
||||
glMapBufferRangeEXT(GL_PIXEL_PACK_BUFFER, 0, 4 * mFBOWidth * mFBOHeight, GL_MAP_READ_BIT);
|
||||
|
|
|
@ -6477,9 +6477,9 @@ TEST_P(ImageRespecificationTest, ImageTarget2DOESSwitch)
|
|||
EGL_TRUE,
|
||||
EGL_NONE,
|
||||
};
|
||||
EGLImageKHR firstEGLImage =
|
||||
eglCreateImageKHR(window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(firstTexture.get()), attribs);
|
||||
EGLImageKHR firstEGLImage = eglCreateImageKHR(
|
||||
window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(static_cast<uintptr_t>(firstTexture.get())), attribs);
|
||||
ASSERT_EGL_SUCCESS();
|
||||
|
||||
// Create the target texture and attach it to the framebuffer
|
||||
|
@ -6520,9 +6520,9 @@ TEST_P(ImageRespecificationTest, ImageTarget2DOESSwitch)
|
|||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
EGLImageKHR secondEGLImage =
|
||||
eglCreateImageKHR(window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(secondTexture.get()), attribs);
|
||||
EGLImageKHR secondEGLImage = eglCreateImageKHR(
|
||||
window->getDisplay(), window->getContext(), EGL_GL_TEXTURE_2D_KHR,
|
||||
reinterpret_cast<EGLClientBuffer>(static_cast<uintptr_t>(secondTexture.get())), attribs);
|
||||
ASSERT_EGL_SUCCESS();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, mTargetTexture);
|
||||
|
|
|
@ -2615,8 +2615,9 @@ TEST_P(VertexAttributeTestES31, OnlyUpdateBindingByVertexAttribPointer)
|
|||
GL_STATIC_DRAW);
|
||||
|
||||
// Only update the binding kTestBinding in the second draw by VertexAttribPointer.
|
||||
glVertexAttribPointer(kTestBinding, 1, GL_FLOAT, GL_FALSE, 0,
|
||||
reinterpret_cast<const void *>(kTestFloatOffset2 * kFloatStride));
|
||||
glVertexAttribPointer(
|
||||
kTestBinding, 1, GL_FLOAT, GL_FALSE, 0,
|
||||
reinterpret_cast<const void *>(static_cast<uintptr_t>(kTestFloatOffset2 * kFloatStride)));
|
||||
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
checkPixels();
|
||||
|
@ -3311,7 +3312,7 @@ void main()
|
|||
glVertexAttribPointer(posLoc, 4, GL_FLOAT, GL_FALSE, stride, nullptr);
|
||||
glEnableVertexAttribArray(posLoc);
|
||||
glVertexAttribPointer(colorLoc, 2, GL_FLOAT, GL_FALSE, stride,
|
||||
reinterpret_cast<GLvoid *>(kColorOffset));
|
||||
reinterpret_cast<GLvoid *>(static_cast<uintptr_t>(kColorOffset)));
|
||||
glEnableVertexAttribArray(colorLoc);
|
||||
|
||||
glDrawArrays(GL_POINTS, 0, numVertices);
|
||||
|
|
|
@ -3009,12 +3009,14 @@ void main()
|
|||
glUniform1i(uniLoc, 1);
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, ubo1);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast<GLvoid *>(offset));
|
||||
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
reinterpret_cast<GLvoid *>(static_cast<uintptr_t>(offset)));
|
||||
offset += sizeof(GLColor);
|
||||
glUniform1i(uniLoc, 2);
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, ubo2);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast<GLvoid *>(offset));
|
||||
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
reinterpret_cast<GLvoid *>(static_cast<uintptr_t>(offset)));
|
||||
offset += sizeof(GLColor);
|
||||
|
||||
// Capture the allocations counter after the first run.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <random>
|
||||
#include <sstream>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "util/shader_utils.h"
|
||||
|
||||
namespace angle
|
||||
|
@ -36,6 +37,9 @@ size_t GetFrequencyValue(Frequency frequency, size_t sometimesValue)
|
|||
return std::numeric_limits<size_t>::max();
|
||||
case Frequency::Sometimes:
|
||||
return sometimesValue;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +53,9 @@ std::string FrequencyToString(Frequency frequency)
|
|||
return "sometimes";
|
||||
case Frequency::Never:
|
||||
return "never";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ const char *ResultTypeToString(TestResultType type)
|
|||
case TestResultType::Timeout:
|
||||
return "TIMEOUT";
|
||||
case TestResultType::Unknown:
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
@ -2001,6 +2002,7 @@ const char *TestResultTypeToString(TestResultType type)
|
|||
case TestResultType::Timeout:
|
||||
return "Timeout";
|
||||
case TestResultType::Unknown:
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,9 @@ config("glmark2_common_config") {
|
|||
|
||||
# A warning generated in scene-effect-2d in vec2::calc_offset
|
||||
"/wd4146",
|
||||
|
||||
# Needs to be explicitly disabled after http://crrev.com/c/3189512
|
||||
"/wd4312",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче