Commit 9ed48bae by Nicolas Capens

Prevent LTO from eliminating cross-library virtual methods.

libEGL has to call virtual methods on objects created withing libGLESv2, and vice-versa. Clang's aggressive link-time-optimization considers calls to these methods unreachable, because they're not defined within the same linkage unit. So when they do get called, we're hitting UD instructions. It can be fixed by marking these classes with [[clang::lto_visibility_public]] attributes: https://clang.llvm.org/docs/LTOVisibility.html Bug chromium:720933 Change-Id: I87f9b09921a1b2d443121efcdb5525ff4cb5797b Reviewed-on: https://swiftshader-review.googlesource.com/9688Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent f34d1ace
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
# Need a separate config to ensure the warnings are added to the end. # Need a separate config to ensure the warnings are added to the end.
config("swiftshader_common_private_config") { config("swiftshader_common_private_config") {
if (is_win) { if (is_win) {
cflags = [ "/wd4201" ] # nameless struct/union cflags = [
"/wd4201", # nameless struct/union
"/wd5030", # attribute is not recognized
]
} else { } else {
cflags = [ "-msse2" ] cflags = [ "-msse2" ]
defines = [ "LOG_TAG=\"swiftshader_common\"" ] defines = [ "LOG_TAG=\"swiftshader_common\"" ]
......
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
# Need a separate config to ensure the warnings are added to the end. # Need a separate config to ensure the warnings are added to the end.
config("swiftshader_main_private_config") { config("swiftshader_main_private_config") {
if (is_win) { if (is_win) {
cflags = [ "/wd4201" ] # nameless struct/union cflags = [
"/wd4201", # nameless struct/union
"/wd5030", # attribute is not recognized
]
if (is_clang) { if (is_clang) {
cflags += [ cflags += [
......
...@@ -34,7 +34,7 @@ namespace sw ...@@ -34,7 +34,7 @@ namespace sw
int cursorHeight; int cursorHeight;
}; };
class FrameBuffer class [[clang::lto_visibility_public]] FrameBuffer
{ {
virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html) virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html)
......
...@@ -18,6 +18,7 @@ config("swiftshader_opengl_common_private_config") { ...@@ -18,6 +18,7 @@ config("swiftshader_opengl_common_private_config") {
cflags = [ cflags = [
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4324", # structure was padded due to alignment specifier "/wd4324", # structure was padded due to alignment specifier
"/wd5030", # attribute is not recognized
] ]
} else { } else {
defines = [ "LOG_TAG=\"swiftshader_opengl_common\"" ] defines = [ "LOG_TAG=\"swiftshader_opengl_common\"" ]
......
...@@ -46,7 +46,7 @@ GLsizei ComputePitch(GLsizei width, GLenum format, GLenum type, GLint alignment) ...@@ -46,7 +46,7 @@ GLsizei ComputePitch(GLsizei width, GLenum format, GLenum type, GLint alignment)
GLsizei ComputeCompressedSize(GLsizei width, GLsizei height, GLenum format); GLsizei ComputeCompressedSize(GLsizei width, GLsizei height, GLenum format);
size_t ComputePackingOffset(GLenum format, GLenum type, GLsizei width, GLsizei height, GLint alignment, GLint skipImages, GLint skipRows, GLint skipPixels); size_t ComputePackingOffset(GLenum format, GLenum type, GLsizei width, GLsizei height, GLint alignment, GLint skipImages, GLint skipRows, GLint skipPixels);
class Image : public sw::Surface, public gl::Object class [[clang::lto_visibility_public]] Image : public sw::Surface, public gl::Object
{ {
virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html) virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html)
......
...@@ -28,7 +28,7 @@ typedef unsigned int GLuint; ...@@ -28,7 +28,7 @@ typedef unsigned int GLuint;
namespace gl namespace gl
{ {
class Object class [[clang::lto_visibility_public]] Object
{ {
public: public:
Object(); Object();
......
...@@ -20,6 +20,7 @@ config("swiftshader_opengl_compiler_private_config") { ...@@ -20,6 +20,7 @@ config("swiftshader_opengl_compiler_private_config") {
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4267", # conversion from size_t to int/unsigned int "/wd4267", # conversion from size_t to int/unsigned int
"/wd4702", # unreachable code (in autogenerated code) "/wd4702", # unreachable code (in autogenerated code)
"/wd5030", # attribute is not recognized
] ]
if (!is_debug) { if (!is_debug) {
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers> <OmitFramePointers>false</OmitFramePointers>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;</DisableSpecificWarnings>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers> <OmitFramePointers>false</OmitFramePointers>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;4005;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
......
...@@ -22,6 +22,7 @@ config("swiftshader_libEGL_private_config") { ...@@ -22,6 +22,7 @@ config("swiftshader_libEGL_private_config") {
cflags = [ cflags = [
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4065", # switch statement contains 'default' but no 'case' labels "/wd4065", # switch statement contains 'default' but no 'case' labels
"/wd5030", # attribute is not recognized
] ]
defines += [ defines += [
......
...@@ -26,7 +26,7 @@ class Display; ...@@ -26,7 +26,7 @@ class Display;
class Surface; class Surface;
class Image; class Image;
class Context : public gl::Object class [[clang::lto_visibility_public]] Context : public gl::Object
{ {
public: public:
Context(egl::Display *display) : display(display) {} Context(egl::Display *display) : display(display) {}
......
...@@ -35,7 +35,7 @@ namespace egl ...@@ -35,7 +35,7 @@ namespace egl
const EGLDisplay PRIMARY_DISPLAY = reinterpret_cast<EGLDisplay>((intptr_t)1); const EGLDisplay PRIMARY_DISPLAY = reinterpret_cast<EGLDisplay>((intptr_t)1);
const EGLDisplay HEADLESS_DISPLAY = reinterpret_cast<EGLDisplay>((intptr_t)0xFACE1E55); const EGLDisplay HEADLESS_DISPLAY = reinterpret_cast<EGLDisplay>((intptr_t)0xFACE1E55);
class Display class [[clang::lto_visibility_public]] Display
{ {
virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html) virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html)
......
...@@ -31,7 +31,7 @@ class Config; ...@@ -31,7 +31,7 @@ class Config;
class Texture; class Texture;
class Image; class Image;
class Surface : public gl::Object class [[clang::lto_visibility_public]] Surface : public gl::Object
{ {
virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html) virtual void typeinfo(); // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html)
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
...@@ -160,6 +161,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans ...@@ -160,6 +161,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
...@@ -191,6 +193,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans ...@@ -191,6 +193,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
...@@ -222,6 +225,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans ...@@ -222,6 +225,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
...@@ -255,6 +259,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans ...@@ -255,6 +259,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers> <OmitFramePointers>false</OmitFramePointers>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
...@@ -286,6 +291,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans ...@@ -286,6 +291,7 @@ copy "$(OutDir)libEGL.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\trans
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers> <OmitFramePointers>false</OmitFramePointers>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>5030</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
......
...@@ -25,6 +25,7 @@ config("swiftshader_libGLESv2_private_config") { ...@@ -25,6 +25,7 @@ config("swiftshader_libGLESv2_private_config") {
cflags = [ cflags = [
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4324", # structure was padded due to alignment specifier "/wd4324", # structure was padded due to alignment specifier
"/wd5030", # attribute is not recognized
] ]
defines += [ defines += [
......
...@@ -426,12 +426,12 @@ struct State ...@@ -426,12 +426,12 @@ struct State
GLint packSkipImages; GLint packSkipImages;
}; };
class Context : public egl::Context class [[clang::lto_visibility_public]] Context : public egl::Context
{ {
public: public:
Context(egl::Display *display, const Context *shareContext, EGLint clientVersion); Context(egl::Display *display, const Context *shareContext, EGLint clientVersion);
virtual void makeCurrent(egl::Surface *surface); void makeCurrent(egl::Surface *surface) override;
virtual EGLint getClientVersion() const; virtual EGLint getClientVersion() const;
void markAllStateDirty(); void markAllStateDirty();
...@@ -673,7 +673,7 @@ public: ...@@ -673,7 +673,7 @@ public:
void clearStencilBuffer(const GLint value); void clearStencilBuffer(const GLint value);
void drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount = 1); void drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount = 1);
void drawElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount = 1); void drawElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount = 1);
void finish(); void finish() override;
void flush(); void flush();
void recordInvalidEnum(); void recordInvalidEnum();
...@@ -690,9 +690,9 @@ public: ...@@ -690,9 +690,9 @@ public:
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, bool filter, bool allowPartialDepthStencilBlit); GLbitfield mask, bool filter, bool allowPartialDepthStencilBlit);
virtual void bindTexImage(egl::Surface *surface); void bindTexImage(egl::Surface *surface) override;
virtual EGLenum validateSharedImage(EGLenum target, GLuint name, GLuint textureLevel); EGLenum validateSharedImage(EGLenum target, GLuint name, GLuint textureLevel) override;
virtual egl::Image *createSharedImage(EGLenum target, GLuint name, GLuint textureLevel); egl::Image *createSharedImage(EGLenum target, GLuint name, GLuint textureLevel) override;
egl::Image *getSharedImage(GLeglImageOES image); egl::Image *getSharedImage(GLeglImageOES image);
Device *getDevice(); Device *getDevice();
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
...@@ -165,7 +165,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr ...@@ -165,7 +165,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
...@@ -202,7 +202,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr ...@@ -202,7 +202,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<IntrinsicFunctions>false</IntrinsicFunctions> <IntrinsicFunctions>false</IntrinsicFunctions>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
...@@ -240,7 +240,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr ...@@ -240,7 +240,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<IntrinsicFunctions>false</IntrinsicFunctions> <IntrinsicFunctions>false</IntrinsicFunctions>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
...@@ -279,7 +279,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr ...@@ -279,7 +279,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<IntrinsicFunctions>false</IntrinsicFunctions> <IntrinsicFunctions>false</IntrinsicFunctions>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
...@@ -315,7 +315,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr ...@@ -315,7 +315,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)lib\$(Configuration)_$(Platform)\tr
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<IntrinsicFunctions>false</IntrinsicFunctions> <IntrinsicFunctions>false</IntrinsicFunctions>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
......
...@@ -18,6 +18,7 @@ config("swiftshader_renderer_private_config") { ...@@ -18,6 +18,7 @@ config("swiftshader_renderer_private_config") {
cflags = [ cflags = [
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4324", # structure was padded due to alignment specifier "/wd4324", # structure was padded due to alignment specifier
"/wd5030", # attribute is not recognized
] ]
} else { } else {
cflags = [ cflags = [
......
...@@ -217,7 +217,7 @@ namespace sw ...@@ -217,7 +217,7 @@ namespace sw
LOCK_DISCARD LOCK_DISCARD
}; };
class Surface class [[clang::lto_visibility_public]] Surface
{ {
private: private:
struct Buffer struct Buffer
......
...@@ -18,6 +18,7 @@ config("swiftshader_shader_private_config") { ...@@ -18,6 +18,7 @@ config("swiftshader_shader_private_config") {
cflags = [ cflags = [
"/wd4201", # nameless struct/union "/wd4201", # nameless struct/union
"/wd4324", # structure was padded due to alignment specifier "/wd4324", # structure was padded due to alignment specifier
"/wd5030", # attribute is not recognized
] ]
if (is_clang) { if (is_clang) {
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat> <DebugInformationFormat>
</DebugInformationFormat> </DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat> <DebugInformationFormat>
</DebugInformationFormat> </DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment