ANGLE: Fix debug-and-release builds
Add a 'd' to debug builds to allow both release and debug builds to be used. - Add .def-files for Debug - Build all libraries debug/release - Add description to README.qt - Differentiate debug/release in qmake.conf. Task-number: QTBUG-28196 Change-Id: Ib3081004a6ed2ad71d353244154684d2e0ebbc86 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
f229db5d57
commit
95a05904b9
@ -9,10 +9,15 @@ wince* {
|
||||
contains(QT_CONFIG, opengles2) {
|
||||
# For Desktop, use the ANGLE library location passed on from configure.
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
|
||||
LIBS += $$QMAKE_LIBS_OPENGL_ES2
|
||||
CONFIG(debug, debug|release) {
|
||||
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_DEBUG
|
||||
contains(QT_CONFIG, angle) {
|
||||
LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
|
||||
} else {
|
||||
LIBS += $$QMAKE_LIBS_OPENGL_ES2
|
||||
}
|
||||
} else {
|
||||
LIBS += $$QMAKE_LIBS_OPENGL_ES2
|
||||
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
|
||||
}
|
||||
DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ES_2_ANGLE
|
||||
|
@ -86,6 +86,7 @@ QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32
|
||||
QMAKE_LIBS_NETWORK = -lws2_32
|
||||
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
|
||||
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
|
||||
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
|
||||
|
||||
|
@ -73,6 +73,7 @@ QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.li
|
||||
QMAKE_LIBS_NETWORK = ws2_32.lib
|
||||
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
@ -75,6 +75,7 @@ QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.li
|
||||
QMAKE_LIBS_NETWORK = ws2_32.lib
|
||||
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
@ -77,6 +77,7 @@ QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.li
|
||||
QMAKE_LIBS_NETWORK = ws2_32.lib
|
||||
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
@ -78,6 +78,7 @@ QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.li
|
||||
QMAKE_LIBS_NETWORK = ws2_32.lib
|
||||
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
|
||||
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
36
src/3rdparty/angle/src/libEGL/libEGLd.def
vendored
Normal file
36
src/3rdparty/angle/src/libEGL/libEGLd.def
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
LIBRARY libEGLd
|
||||
EXPORTS
|
||||
eglBindAPI @14
|
||||
eglBindTexImage @20
|
||||
eglChooseConfig @7
|
||||
eglCopyBuffers @33
|
||||
eglCreateContext @23
|
||||
eglCreatePbufferFromClientBuffer @18
|
||||
eglCreatePbufferSurface @10
|
||||
eglCreatePixmapSurface @11
|
||||
eglCreateWindowSurface @9
|
||||
eglDestroyContext @24
|
||||
eglDestroySurface @12
|
||||
eglGetConfigAttrib @8
|
||||
eglGetConfigs @6
|
||||
eglGetCurrentContext @26
|
||||
eglGetCurrentDisplay @28
|
||||
eglGetCurrentSurface @27
|
||||
eglGetDisplay @2
|
||||
eglGetError @1
|
||||
eglGetProcAddress @34
|
||||
eglInitialize @3
|
||||
eglMakeCurrent @25
|
||||
eglQueryAPI @15
|
||||
eglQueryContext @29
|
||||
eglQueryString @5
|
||||
eglQuerySurface @13
|
||||
eglReleaseTexImage @21
|
||||
eglReleaseThread @17
|
||||
eglSurfaceAttrib @19
|
||||
eglSwapBuffers @32
|
||||
eglSwapInterval @22
|
||||
eglTerminate @4
|
||||
eglWaitClient @16
|
||||
eglWaitGL @30
|
||||
eglWaitNative @31
|
182
src/3rdparty/angle/src/libGLESv2/libGLESv2d.def
vendored
Normal file
182
src/3rdparty/angle/src/libGLESv2/libGLESv2d.def
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
LIBRARY libGLESv2d
|
||||
EXPORTS
|
||||
glActiveTexture @1
|
||||
glAttachShader @2
|
||||
glBindAttribLocation @3
|
||||
glBindBuffer @4
|
||||
glBindFramebuffer @5
|
||||
glBindRenderbuffer @6
|
||||
glBindTexture @7
|
||||
glBlendColor @8
|
||||
glBlendEquation @9
|
||||
glBlendEquationSeparate @10
|
||||
glBlendFunc @11
|
||||
glBlendFuncSeparate @12
|
||||
glBufferData @13
|
||||
glBufferSubData @14
|
||||
glCheckFramebufferStatus @15
|
||||
glClear @16
|
||||
glClearColor @17
|
||||
glClearDepthf @18
|
||||
glClearStencil @19
|
||||
glColorMask @20
|
||||
glCompileShader @21
|
||||
glCompressedTexImage2D @22
|
||||
glCompressedTexSubImage2D @23
|
||||
glCopyTexImage2D @24
|
||||
glCopyTexSubImage2D @25
|
||||
glCreateProgram @26
|
||||
glCreateShader @27
|
||||
glCullFace @28
|
||||
glDeleteBuffers @29
|
||||
glDeleteFramebuffers @30
|
||||
glDeleteProgram @32
|
||||
glDeleteRenderbuffers @33
|
||||
glDeleteShader @34
|
||||
glDeleteTextures @31
|
||||
glDepthFunc @36
|
||||
glDepthMask @37
|
||||
glDepthRangef @38
|
||||
glDetachShader @35
|
||||
glDisable @39
|
||||
glDisableVertexAttribArray @40
|
||||
glDrawArrays @41
|
||||
glDrawElements @42
|
||||
glEnable @43
|
||||
glEnableVertexAttribArray @44
|
||||
glFinish @45
|
||||
glFlush @46
|
||||
glFramebufferRenderbuffer @47
|
||||
glFramebufferTexture2D @48
|
||||
glFrontFace @49
|
||||
glGenBuffers @50
|
||||
glGenFramebuffers @52
|
||||
glGenRenderbuffers @53
|
||||
glGenTextures @54
|
||||
glGenerateMipmap @51
|
||||
glGetActiveAttrib @55
|
||||
glGetActiveUniform @56
|
||||
glGetAttachedShaders @57
|
||||
glGetAttribLocation @58
|
||||
glGetBooleanv @59
|
||||
glGetBufferParameteriv @60
|
||||
glGetError @61
|
||||
glGetFloatv @62
|
||||
glGetFramebufferAttachmentParameteriv @63
|
||||
glGetIntegerv @64
|
||||
glGetProgramInfoLog @66
|
||||
glGetProgramiv @65
|
||||
glGetRenderbufferParameteriv @67
|
||||
glGetShaderInfoLog @69
|
||||
glGetShaderPrecisionFormat @70
|
||||
glGetShaderSource @71
|
||||
glGetShaderiv @68
|
||||
glGetString @72
|
||||
glGetTexParameterfv @73
|
||||
glGetTexParameteriv @74
|
||||
glGetUniformLocation @77
|
||||
glGetUniformfv @75
|
||||
glGetUniformiv @76
|
||||
glGetVertexAttribPointerv @80
|
||||
glGetVertexAttribfv @78
|
||||
glGetVertexAttribiv @79
|
||||
glHint @81
|
||||
glIsBuffer @82
|
||||
glIsEnabled @83
|
||||
glIsFramebuffer @84
|
||||
glIsProgram @85
|
||||
glIsRenderbuffer @86
|
||||
glIsShader @87
|
||||
glIsTexture @88
|
||||
glLineWidth @89
|
||||
glLinkProgram @90
|
||||
glPixelStorei @91
|
||||
glPolygonOffset @92
|
||||
glReadPixels @93
|
||||
glReleaseShaderCompiler @94
|
||||
glRenderbufferStorage @95
|
||||
glSampleCoverage @96
|
||||
glScissor @97
|
||||
glShaderBinary @98
|
||||
glShaderSource @99
|
||||
glStencilFunc @100
|
||||
glStencilFuncSeparate @101
|
||||
glStencilMask @102
|
||||
glStencilMaskSeparate @103
|
||||
glStencilOp @104
|
||||
glStencilOpSeparate @105
|
||||
glTexImage2D @106
|
||||
glTexParameterf @107
|
||||
glTexParameterfv @108
|
||||
glTexParameteri @109
|
||||
glTexParameteriv @110
|
||||
glTexSubImage2D @111
|
||||
glUniform1f @112
|
||||
glUniform1fv @113
|
||||
glUniform1i @114
|
||||
glUniform1iv @115
|
||||
glUniform2f @116
|
||||
glUniform2fv @117
|
||||
glUniform2i @118
|
||||
glUniform2iv @119
|
||||
glUniform3f @120
|
||||
glUniform3fv @121
|
||||
glUniform3i @122
|
||||
glUniform3iv @123
|
||||
glUniform4f @124
|
||||
glUniform4fv @125
|
||||
glUniform4i @126
|
||||
glUniform4iv @127
|
||||
glUniformMatrix2fv @128
|
||||
glUniformMatrix3fv @129
|
||||
glUniformMatrix4fv @130
|
||||
glUseProgram @131
|
||||
glValidateProgram @132
|
||||
glVertexAttrib1f @133
|
||||
glVertexAttrib1fv @134
|
||||
glVertexAttrib2f @135
|
||||
glVertexAttrib2fv @136
|
||||
glVertexAttrib3f @137
|
||||
glVertexAttrib3fv @138
|
||||
glVertexAttrib4f @139
|
||||
glVertexAttrib4fv @140
|
||||
glVertexAttribPointer @141
|
||||
glViewport @142
|
||||
|
||||
; Extensions
|
||||
glTexImage3DOES @143
|
||||
glBlitFramebufferANGLE @149
|
||||
glRenderbufferStorageMultisampleANGLE @150
|
||||
glDeleteFencesNV @151
|
||||
glFinishFenceNV @152
|
||||
glGenFencesNV @153
|
||||
glGetFenceivNV @154
|
||||
glIsFenceNV @155
|
||||
glSetFenceNV @156
|
||||
glTestFenceNV @157
|
||||
glGetTranslatedShaderSourceANGLE @159
|
||||
glTexStorage2DEXT @160
|
||||
glGetGraphicsResetStatusEXT @161
|
||||
glReadnPixelsEXT @162
|
||||
glGetnUniformfvEXT @163
|
||||
glGetnUniformivEXT @164
|
||||
glGenQueriesEXT @165
|
||||
glDeleteQueriesEXT @166
|
||||
glIsQueryEXT @167
|
||||
glBeginQueryEXT @168
|
||||
glEndQueryEXT @169
|
||||
glGetQueryivEXT @170
|
||||
glGetQueryObjectuivEXT @171
|
||||
glVertexAttribDivisorANGLE @172
|
||||
glDrawArraysInstancedANGLE @173
|
||||
glDrawElementsInstancedANGLE @174
|
||||
glProgramBinaryOES @175
|
||||
glGetProgramBinaryOES @176
|
||||
|
||||
; EGL dependencies
|
||||
glCreateContext @144 NONAME
|
||||
glDestroyContext @145 NONAME
|
||||
glMakeCurrent @146 NONAME
|
||||
glGetCurrentContext @147 NONAME
|
||||
glGetProcAddress @148 NONAME
|
||||
glBindTexImage @158 NONAME
|
@ -19,6 +19,15 @@ Qt should be kept. If there are new source/header files in ANGLE
|
||||
(git status -u) then they should be added to the relevant .pro
|
||||
file before committing.
|
||||
|
||||
The patches in src/angle/patches should be applied on top.
|
||||
|
||||
ANGLE ships with .def files for exporting functions in
|
||||
3rdparty/angle/src/libEGL/libEGL.def and
|
||||
3rdparty/angle/src/libGLESv2/libGLESv2.def.
|
||||
Since we build debug and release versions
|
||||
(libbEGL.dll/libEGLd.dll, respectively), debug versions of
|
||||
the .def files (libEGLd.def) must be created as copies
|
||||
with the LIBRARY name entry adapted.
|
||||
|
||||
Using a custom ANGLE
|
||||
-------------------------------------------------------------
|
||||
|
@ -40,11 +40,6 @@ win32-msvc2012 {
|
||||
}
|
||||
}
|
||||
|
||||
# Use the DEF files in release mode
|
||||
msvc:CONFIG(release, debug|release) {
|
||||
QMAKE_LFLAGS += /DEF:$$ANGLE_DIR/src/$${TARGET}/$${TARGET}.def
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
$$ANGLE_DIR/src/common/angleutils.h \
|
||||
$$ANGLE_DIR/src/common/debug.h \
|
||||
|
@ -1,6 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += static
|
||||
TARGET = preprocessor
|
||||
TARGET = $$qtLibraryTarget(preprocessor)
|
||||
|
||||
include(../../config.pri)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += static
|
||||
TARGET = translator_common
|
||||
TARGET = $$qtLibraryTarget(translator_common)
|
||||
|
||||
include(../config.pri)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += static
|
||||
TARGET = translator_hlsl
|
||||
TARGET = $$qtLibraryTarget(translator_hlsl)
|
||||
|
||||
include(../config.pri)
|
||||
|
||||
|
@ -46,17 +46,6 @@ DEFINES += ANGLE_DISABLE_TRACE \
|
||||
ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0 \
|
||||
ANGLE_USE_NEW_PREPROCESSOR=1
|
||||
|
||||
# Force release builds for now. Debug builds of ANGLE will generate libraries with
|
||||
# the 'd' library suffix, but this means that the library name no longer matches that
|
||||
# listed in the DEF file which causes errors at runtime. Using the DEF is mandatory
|
||||
# to generate the import library because the symbols are not marked with __declspec
|
||||
# and therefore not exported by default. With the import library, the debug build is
|
||||
# useless, so just disable until we can find another solution.
|
||||
CONFIG -= debug
|
||||
CONFIG += release
|
||||
|
||||
TARGET = $$qtLibraryTarget($$TARGET)
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
} else {
|
||||
@ -67,6 +56,9 @@ CONFIG(debug, debug|release) {
|
||||
CONFIG -= qt
|
||||
CONFIG += stl rtti_off exceptions c++11
|
||||
|
||||
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
|
||||
contains(QT_CONFIG, build_all):CONFIG += build_all
|
||||
|
||||
INCLUDEPATH += . .. $$PWD/../include
|
||||
|
||||
DESTDIR = $$QT_BUILD_TREE/lib
|
||||
|
@ -1,5 +1,5 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = libEGL
|
||||
TARGET = $$qtLibraryTarget(libEGL)
|
||||
|
||||
include(../common/common.pri)
|
||||
|
||||
@ -7,7 +7,7 @@ include(../common/common.pri)
|
||||
# in Surface.cpp, which would otherwise require -ldwmapi, which does not exist on Windows XP
|
||||
# (QTBUG-27741).
|
||||
LIBS += -ld3d9 -ldxguid \
|
||||
-L$$QT_BUILD_TREE/lib -llibGLESv2
|
||||
-L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget(libGLESv2)
|
||||
|
||||
HEADERS += \
|
||||
$$ANGLE_DIR/src/libEGL/Config.h \
|
||||
@ -24,6 +24,8 @@ SOURCES += \
|
||||
$$ANGLE_DIR/src/libEGL/main.cpp \
|
||||
$$ANGLE_DIR/src/libEGL/Surface.cpp
|
||||
|
||||
msvc:DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
|
||||
|
||||
load(qt_installs)
|
||||
|
||||
egl_headers.files = \
|
||||
|
@ -1,5 +1,5 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = libGLESv2
|
||||
TARGET = $$qtLibraryTarget(libGLESv2)
|
||||
DEPENDPATH += . shaders
|
||||
CONFIG += simd
|
||||
|
||||
@ -67,6 +67,8 @@ SOURCES += \
|
||||
|
||||
SSE2_SOURCES += $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp
|
||||
|
||||
msvc:DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
|
||||
|
||||
float_converter.target = float_converter
|
||||
float_converter.commands = python $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.py \
|
||||
> $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user