Use precompiled headers on MSVC
authorJeff Bolz <jbolz@nvidia.com>
Fri, 19 Oct 2018 04:00:34 +0000 (23:00 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 31 Oct 2018 10:21:32 +0000 (06:21 -0400)
This is a significant improvement in build time on MSVC,
maybe 25% overall. Qualitatively, compile time is about 2x
faster, but link time, lack of parallelism for the whole
duration of the build, and some unaccelerated components
(e.g. glslang and some internal modules) reduce the total
wall clock time improvement from 50% down to that 25%.

This also helps a lot with performance of the builds for
generating mustpass lists.

Components: Vulkan, OpenGL, Framework
Change-Id: I6013d9728444d9892e9a5ec8f31a574c10ca06b2

62 files changed:
AndroidGen.mk
CMakeLists.txt
external/openglcts/modules/CMakeLists.txt
external/openglcts/modules/common/CMakeLists.txt
external/openglcts/modules/gl/CMakeLists.txt
external/openglcts/modules/gles31/CMakeLists.txt
external/openglcts/modules/glesext/CMakeLists.txt
external/openglcts/modules/pch.cpp [new file with mode: 0644]
external/openglcts/modules/pch.h [new file with mode: 0644]
external/vulkancts/framework/vulkan/CMakeLists.txt
external/vulkancts/modules/vulkan/CMakeLists.txt
external/vulkancts/modules/vulkan/api/CMakeLists.txt
external/vulkancts/modules/vulkan/binding_model/CMakeLists.txt
external/vulkancts/modules/vulkan/compute/CMakeLists.txt
external/vulkancts/modules/vulkan/draw/CMakeLists.txt
external/vulkancts/modules/vulkan/dynamic_state/CMakeLists.txt
external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt
external/vulkancts/modules/vulkan/geometry/CMakeLists.txt
external/vulkancts/modules/vulkan/image/CMakeLists.txt
external/vulkancts/modules/vulkan/memory/CMakeLists.txt
external/vulkancts/modules/vulkan/multiview/CMakeLists.txt
external/vulkancts/modules/vulkan/pch.cpp [new file with mode: 0644]
external/vulkancts/modules/vulkan/pch.h [new file with mode: 0644]
external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt
external/vulkancts/modules/vulkan/protected_memory/CMakeLists.txt
external/vulkancts/modules/vulkan/query_pool/CMakeLists.txt
external/vulkancts/modules/vulkan/renderpass/CMakeLists.txt
external/vulkancts/modules/vulkan/robustness/CMakeLists.txt
external/vulkancts/modules/vulkan/shaderexecutor/CMakeLists.txt
external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt
external/vulkancts/modules/vulkan/sparse_resources/CMakeLists.txt
external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt
external/vulkancts/modules/vulkan/subgroups/CMakeLists.txt [changed mode: 0755->0644]
external/vulkancts/modules/vulkan/synchronization/CMakeLists.txt
external/vulkancts/modules/vulkan/tessellation/CMakeLists.txt
external/vulkancts/modules/vulkan/texture/CMakeLists.txt
external/vulkancts/modules/vulkan/ubo/CMakeLists.txt
external/vulkancts/modules/vulkan/wsi/CMakeLists.txt
external/vulkancts/modules/vulkan/ycbcr/CMakeLists.txt
framework/common/CMakeLists.txt
framework/delibs/decpp/CMakeLists.txt
framework/delibs/decpp/pch.cpp [new file with mode: 0644]
framework/delibs/decpp/pch.h [new file with mode: 0644]
framework/opengl/CMakeLists.txt
framework/pch.cpp [new file with mode: 0644]
framework/pch.h [new file with mode: 0644]
framework/randomshaders/CMakeLists.txt
framework/referencerenderer/CMakeLists.txt
modules/egl/CMakeLists.txt
modules/gles2/accuracy/CMakeLists.txt
modules/gles2/functional/CMakeLists.txt
modules/gles2/performance/CMakeLists.txt
modules/gles2/stress/CMakeLists.txt
modules/gles3/accuracy/CMakeLists.txt
modules/gles3/functional/CMakeLists.txt
modules/gles3/performance/CMakeLists.txt
modules/gles3/stress/CMakeLists.txt
modules/gles31/functional/CMakeLists.txt
modules/gles31/stress/CMakeLists.txt
modules/glshared/CMakeLists.txt
modules/pch.cpp [new file with mode: 0644]
modules/pch.h [new file with mode: 0644]

index d77ec95..e401ade 100644 (file)
@@ -152,6 +152,7 @@ LOCAL_SRC_FILES := \
        external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp \
        external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderUtil.cpp \
        external/vulkancts/modules/vulkan/multiview/vktMultiViewTests.cpp \
+       external/vulkancts/modules/vulkan/pch.cpp \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineClearUtil.cpp \
@@ -448,6 +449,7 @@ LOCAL_SRC_FILES := \
        framework/delibs/decpp/deThreadLocal.cpp \
        framework/delibs/decpp/deThreadSafeRingBuffer.cpp \
        framework/delibs/decpp/deUniquePtr.cpp \
+       framework/delibs/decpp/pch.cpp \
        framework/delibs/deimage/deImage.c \
        framework/delibs/deimage/deTarga.c \
        framework/delibs/depool/deMemPool.c \
@@ -1043,7 +1045,8 @@ LOCAL_SRC_FILES := \
        modules/internal/ditTestPackage.cpp \
        modules/internal/ditTestPackageEntry.cpp \
        modules/internal/ditTextureFormatTests.cpp \
-       modules/internal/ditVulkanTests.cpp
+       modules/internal/ditVulkanTests.cpp \
+       modules/pch.cpp
 
 LOCAL_C_INCLUDES := \
        $(deqp_dir)/execserver \
@@ -1062,6 +1065,7 @@ LOCAL_C_INCLUDES := \
        $(deqp_dir)/external/vulkancts/modules/vulkan/memory \
        $(deqp_dir)/external/vulkancts/modules/vulkan/memory_model \
        $(deqp_dir)/external/vulkancts/modules/vulkan/multiview \
+       $(deqp_dir)/external/vulkancts/modules/vulkan \
        $(deqp_dir)/external/vulkancts/modules/vulkan/pipeline \
        $(deqp_dir)/external/vulkancts/modules/vulkan/protected_memory \
        $(deqp_dir)/external/vulkancts/modules/vulkan/query_pool \
@@ -1079,7 +1083,6 @@ LOCAL_C_INCLUDES := \
        $(deqp_dir)/external/vulkancts/modules/vulkan/texture \
        $(deqp_dir)/external/vulkancts/modules/vulkan/ubo \
        $(deqp_dir)/external/vulkancts/modules/vulkan/util \
-       $(deqp_dir)/external/vulkancts/modules/vulkan \
        $(deqp_dir)/external/vulkancts/modules/vulkan/wsi \
        $(deqp_dir)/external/vulkancts/modules/vulkan/ycbcr \
        $(deqp_dir)/framework/common \
@@ -1116,4 +1119,5 @@ LOCAL_C_INCLUDES := \
        $(deqp_dir)/modules/gles31/stress \
        $(deqp_dir)/modules/gles31 \
        $(deqp_dir)/modules/glshared \
-       $(deqp_dir)/modules/internal
+       $(deqp_dir)/modules/internal \
+       $(deqp_dir)/modules
index 3caa6d4..0e8f8ab 100644 (file)
@@ -155,6 +155,22 @@ if (DE_COMPILER_IS_MSC)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS")
 endif ()
 
+# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
+macro(PCH SRCS PCHCPP)
+  if(MSVC)
+    if (CMAKE_GENERATOR MATCHES "^Visual Studio")
+      set(PCH_NAME "$(IntDir)\\pch.pch")
+    else()
+      set(PCH_NAME "pch.pch")
+    endif()
+    # make source files use/depend on PCH_NAME
+    set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME}" OBJECT_DEPENDS "${PCH_NAME}")
+    # make PCHCPP file compile and generate PCH_NAME
+    set_source_files_properties(${PCHCPP} PROPERTIES COMPILE_FLAGS "/Ycpch.h /Fp${PCH_NAME}" OBJECT_OUTPUTS "${PCH_NAME}")
+    list(APPEND ${SRCS} "${PCHCPP}")
+  endif()
+endmacro(PCH)
+
 # delibs projects
 add_subdirectory(framework/delibs/debase)
 add_subdirectory(framework/delibs/depool)
index 1f71a64..dbaaeda 100644 (file)
@@ -9,6 +9,7 @@ include_directories(
        gles32
        glesext
        .
+       ${PROJECT_SOURCE_DIR}/modules/glshared
        )
 
 if (DEQP_GTF_AVAILABLE)
index 994457f..edf9c1f 100644 (file)
@@ -5,10 +5,6 @@ if (DEQP_SUPPORT_WGL)
        add_definitions(-DGLCTS_SUPPORT_WGL=1)
 endif ()
 
-include_directories(
-       ${PROJECT_SOURCE_DIR}/modules/glshared
-       )
-
 set(GLCTS_COMMON_SRCS
        glcAggressiveShaderOptimizationsTests.cpp
        glcAggressiveShaderOptimizationsTests.hpp
@@ -119,6 +115,8 @@ set(GLCTS_COMMON_LIBS
        eglutil
        )
 
+PCH(GLCTS_COMMON_SRCS ../pch.cpp)
+
 add_library(glcts-common STATIC ${GLCTS_COMMON_SRCS})
 target_link_libraries(glcts-common ${GLCTS_COMMON_LIBS})
 
index e769565..e2e0071 100644 (file)
@@ -159,5 +159,7 @@ if (DEQP_GTF_AVAILABLE)
        list(APPEND GLCTS_GL_LIBS glcts-gtf)
 endif ()
 
+PCH(GLCTS_GL_SRCS ../pch.cpp)
+
 add_library(glcts-gl STATIC ${GLCTS_GL_SRCS})
 target_link_libraries(glcts-gl ${GLCTS_GL_LIBS})
index eda3da4..d62c16f 100644 (file)
@@ -63,5 +63,7 @@ set(GLCTS_ES31_LIBS
        tcutil
        )
 
+PCH(GLCTS_ES31_SRCS ../pch.cpp)
+
 add_library(glcts-es31 STATIC ${GLCTS_ES31_SRCS} ${GLCTS_DEQP_GLES31_SRCS})
 target_link_libraries(glcts-es31 ${GLCTS_ES31_LIBS})
index 821e4a8..feeea03 100644 (file)
@@ -209,5 +209,7 @@ set(GLCTS_ESEXT_LIBS
 
 #set(GLCTS_ESEXT_LIBS ${GLCTS_ESEXT_LIBS} glcts-gtf)
 
+PCH(GLCTS_ESEXT_SRCS ../pch.cpp)
+
 add_library(glcts-esext STATIC ${GLCTS_ESEXT_SRCS})
 target_link_libraries(glcts-esext ${GLCTS_ESEXT_LIBS})
diff --git a/external/openglcts/modules/pch.cpp b/external/openglcts/modules/pch.cpp
new file mode 100644 (file)
index 0000000..b8d3f6c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pch.h"
diff --git a/external/openglcts/modules/pch.h b/external/openglcts/modules/pch.h
new file mode 100644 (file)
index 0000000..a7f235d
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef _PCH_H
+#define _PCH_H
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "glsFragmentOpUtil.hpp"
+#include "glsShaderLibrary.hpp"
+#include "glsStateQueryUtil.hpp"
+#include "glsTextureTestUtil.hpp"
+#include "gluPixelTransfer.hpp"
+#include "gluStrUtil.hpp"
+#include "gluObjectWrapper.hpp"
+#include "gluContextInfo.hpp"
+#include "gluPixelTransfer.hpp"
+#include "gluRenderContext.hpp"
+#include "gluShaderProgram.hpp"
+#include "gluCallLogWrapper.hpp"
+#include "gluStrUtil.hpp"
+#include "tcuPixelFormat.hpp"
+#include "tcuEither.hpp"
+#include "tcuImageCompare.hpp"
+#include "tcuMaybe.hpp"
+#include "tcuResultCollector.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTestLog.hpp"
+#include "tcuTexture.hpp"
+#include "tcuTextureUtil.hpp"
+#include "tcuVector.hpp"
+#include "tcuVectorUtil.hpp"
+#include "tcuFloat.hpp"
+#include "deRandom.hpp"
+#include "deStringUtil.hpp"
+#include "rrFragmentOperations.hpp"
+#include "rrMultisamplePixelBufferAccess.hpp"
+#include "rrRenderer.hpp"
+#include "sglrGLContext.hpp"
+#include "sglrReferenceContext.hpp"
+#include "sglrReferenceUtils.hpp"
+#include "glwEnums.hpp"
+#include "glwFunctions.hpp"
+#endif /* _PCH_H */
index 550c715..ed238a2 100644 (file)
@@ -110,6 +110,9 @@ if(DEQP_HAVE_SPIRV_TOOLS)
        set(VKUTIL_LIBS ${VKUTIL_LIBS} SPIRV-Tools SPIRV-Tools-opt)
 endif()
 
+PCH(VKUTILNOSHADER_SRCS ../../modules/vulkan/pch.cpp)
+PCH(VKUTIL_SRCS ../../modules/vulkan/pch.cpp)
+
 add_library(vkutilnoshader STATIC ${VKUTILNOSHADER_SRCS})
 target_link_libraries(vkutilnoshader ${VKUTILNOSHADER_LIBS})
 
index b64a537..9212903 100644 (file)
@@ -125,6 +125,8 @@ if (DE_COMPILER_IS_MSC AND (DE_PTR_SIZE EQUAL 4))
        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
 endif ()
 
+PCH(DEQP_VK_SRCS pch.cpp)
+
 add_deqp_module(deqp-vk "${DEQP_VK_SRCS}" "${DEQP_VK_LIBS}" vktTestPackageEntry.cpp)
 
 add_data_dir(deqp-vk ../../data/vulkan vulkan)
index f9036f4..0db5ff9 100644 (file)
@@ -66,5 +66,7 @@ set(DEQP_VK_API_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_API_SRCS ../pch.cpp)
+
 add_library(deqp-vk-api STATIC ${DEQP_VK_API_SRCS})
 target_link_libraries(deqp-vk-api ${DEQP_VK_API_LIBS})
index 3197699..6de4b7b 100644 (file)
@@ -18,5 +18,7 @@ set(DEQP_VK_BINDING_MODEL_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_BINDING_MODEL_SRCS ../pch.cpp)
+
 add_library(deqp-vk-binding-model STATIC ${DEQP_VK_BINDING_MODEL_SRCS})
 target_link_libraries(deqp-vk-binding-model ${DEQP_VK_BINDING_MODEL_LIBS})
index 9f0b84e..0d1b929 100644 (file)
@@ -18,5 +18,7 @@ set(DEQP_VK_COMPUTE_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_COMPUTE_SRCS ../pch.cpp)
+
 add_library(deqp-vk-compute STATIC ${DEQP_VK_COMPUTE_SRCS})
 target_link_libraries(deqp-vk-compute ${DEQP_VK_COMPUTE_LIBS})
index 00a503b..0b40ae6 100644 (file)
@@ -41,5 +41,7 @@ set(DEQP_VK_DRAW_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_DRAW_SRCS ../pch.cpp)
+
 add_library(deqp-vk-draw STATIC ${DEQP_VK_DRAW_SRCS})
 target_link_libraries(deqp-vk-draw ${DEQP_VK_DRAW_LIBS})
index a4149b7..473fc1a 100644 (file)
@@ -27,5 +27,7 @@ set(DEQP_VK_DYNAMIC_STATE_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_DYNAMIC_STATE_SRCS ../pch.cpp)
+
 add_library(deqp-vk-dynamic-state STATIC ${DEQP_VK_DYNAMIC_STATE_SRCS})
 target_link_libraries(deqp-vk-dynamic-state ${DEQP_VK_DYNAMIC_STATE_LIBS})
index 90347a4..3c42faf 100644 (file)
@@ -18,5 +18,7 @@ set(DEQP_VK_FRAGMENT_OPS_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_FRAGMENT_OPS_SRCS ../pch.cpp)
+
 add_library(deqp-vk-fragment-ops STATIC ${DEQP_VK_FRAGMENT_OPS_SRCS})
 target_link_libraries(deqp-vk-fragment-ops ${DEQP_VK_FRAGMENT_OPS_LIBS})
index d161a7b..19babcf 100644 (file)
@@ -26,5 +26,7 @@ set(DEQP_VK_GEOMETRY_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_GEOMETRY_SRCS ../pch.cpp)
+
 add_library(deqp-vk-geometry STATIC ${DEQP_VK_GEOMETRY_SRCS})
 target_link_libraries(deqp-vk-geometry ${DEQP_VK_GEOMETRY_LIBS})
index 529691c..8845883 100644 (file)
@@ -32,5 +32,7 @@ set(DEQP_VK_IMAGE_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_IMAGE_SRCS ../pch.cpp)
+
 add_library(deqp-vk-image STATIC ${DEQP_VK_IMAGE_SRCS})
 target_link_libraries(deqp-vk-image ${DEQP_VK_IMAGE_LIBS})
index 4727e63..9aec40b 100644 (file)
@@ -24,5 +24,7 @@ set(DEQP_VK_MEMORY_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_MEMORY_SRCS ../pch.cpp)
+
 add_library(deqp-vk-memory STATIC ${DEQP_VK_MEMORY_SRCS})
 target_link_libraries(deqp-vk-memory ${DEQP_VK_MEMORY_LIBS})
index 902d08c..bfd7de1 100644 (file)
@@ -16,5 +16,7 @@ set(DEQP_VK_MULTI_VIEW_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_MULTI_VIEW_SRCS ../pch.cpp)
+
 add_library(deqp-vk-multiview STATIC ${DEQP_VK_MULTI_VIEW_SRCS})
 target_link_libraries(deqp-vk-multiview ${DEQP_VK_MULTI_VIEW_LIBS})
diff --git a/external/vulkancts/modules/vulkan/pch.cpp b/external/vulkancts/modules/vulkan/pch.cpp
new file mode 100644 (file)
index 0000000..b8d3f6c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pch.h"
diff --git a/external/vulkancts/modules/vulkan/pch.h b/external/vulkancts/modules/vulkan/pch.h
new file mode 100644 (file)
index 0000000..90f5d08
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _PCH_H
+#define _PCH_H
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "vktTestCase.hpp"
+#endif /* _PCH_H */
index 6eb374d..af54fa4 100644 (file)
@@ -88,6 +88,8 @@ set(DEQP_VK_PIPELINE_LIBS
        referencerenderer
        )
 
+PCH(DEQP_VK_PIPELINE_SRCS ../pch.cpp)
+
 add_library(deqp-vk-pipeline STATIC ${DEQP_VK_PIPELINE_SRCS})
 target_link_libraries(deqp-vk-pipeline ${DEQP_VK_PIPELINE_LIBS})
 
index 8a9d653..7efcd0e 100644 (file)
@@ -49,5 +49,7 @@ set(DEQP_VK_PROTECTED_MEMORY_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_PROTECTED_MEMORY_SRCS ../pch.cpp)
+
 add_library(deqp-vk-protected-memory STATIC ${DEQP_VK_PROTECTED_MEMORY_SRCS})
 target_link_libraries(deqp-vk-protected-memory ${DEQP_VK_PROTECTED_MEMORY_LIBS})
index 2d99f91..9f2b399 100644 (file)
@@ -18,6 +18,8 @@ set(DEQP_VK_QUERY_POOL_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_QUERY_POOL_SRCS ../pch.cpp)
+
 add_library(deqp-vk-query-pool STATIC ${DEQP_VK_QUERY_POOL_SRCS})
 target_link_libraries(deqp-vk-query-pool ${DEQP_VK_QUERY_POOL_LIBS})
 
index 16734d4..0ef42e3 100644 (file)
@@ -26,5 +26,7 @@ set(DEQP_VK_RENDER_PASS_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_RENDER_PASS_SRCS ../pch.cpp)
+
 add_library(deqp-vk-render-pass STATIC ${DEQP_VK_RENDER_PASS_SRCS})
 target_link_libraries(deqp-vk-render-pass ${DEQP_VK_RENDER_PASS_LIBS})
index 7b0672b..aaeb41a 100644 (file)
@@ -20,6 +20,8 @@ set(DEQP_VK_ROBUSTNESS_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_ROBUSTNESS_SRCS ../pch.cpp)
+
 add_library(deqp-vk-robustness STATIC ${DEQP_VK_ROBUSTNESS_SRCS})
 target_link_libraries(deqp-vk-robustness ${DEQP_VK_ROBUSTNESS_LIBS})
 
index 3951681..4795a05 100644 (file)
@@ -24,5 +24,7 @@ set(DEQP_VK_SHADEREXECUTOR_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_SHADEREXECUTOR_SRCS ../pch.cpp)
+
 add_library(deqp-vk-shaderexecutor STATIC ${DEQP_VK_SHADEREXECUTOR_SRCS})
 target_link_libraries(deqp-vk-shaderexecutor ${DEQP_VK_SHADEREXECUTOR_LIBS})
index a5ff8d6..b4b5582 100644 (file)
@@ -39,5 +39,7 @@ set(DEQP_VK_SHADERRENDER_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_SHADERRENDER_SRCS ../pch.cpp)
+
 add_library(deqp-vk-shaderrender STATIC ${DEQP_VK_SHADERRENDER_SRCS})
 target_link_libraries(deqp-vk-shaderrender ${DEQP_VK_SHADERRENDER_LIBS})
index 29ceb20..46bbe1b 100644 (file)
@@ -44,5 +44,7 @@ set(DEQP_VK_SPARSE_RESOURCES_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_SPARSE_RESOURCES_SRCS ../pch.cpp)
+
 add_library(deqp-vk-sparse-resources STATIC ${DEQP_VK_SPARSE_RESOURCES_SRCS})
 target_link_libraries(deqp-vk-sparse-resources ${DEQP_VK_SPARSE_RESOURCES_LIBS})
index f5680a6..23095f4 100644 (file)
@@ -50,5 +50,7 @@ set(DEQP_VK_SPIRV_ASSEMBLY_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_SPIRV_ASSEMBLY_SRCS ../pch.cpp)
+
 add_library(deqp-vk-spirv-assembly STATIC ${DEQP_VK_SPIRV_ASSEMBLY_SRCS})
 target_link_libraries(deqp-vk-spirv-assembly ${DEQP_VK_SPIRV_ASSEMBLY_LIBS})
old mode 100755 (executable)
new mode 100644 (file)
index 261be78..7178e16
@@ -38,5 +38,7 @@ set(DEQP_VK_SUBGROUPS_LIBS
   vkutil
   )
 
+PCH(DEQP_VK_SUBGROUPS_SRCS ../pch.cpp)
+
 add_library(deqp-vk-subgroups STATIC ${DEQP_VK_SUBGROUPS_SRCS})
 target_link_libraries(deqp-vk-subgroups ${DEQP_VK_SUBGROUPS_LIBS})
index dd660c9..3e6d025 100644 (file)
@@ -36,5 +36,7 @@ set(DEQP_VK_SYNCHRONIZATION_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_SYNCHRONIZATION_SRCS ../pch.cpp)
+
 add_library(deqp-vk-synchronization STATIC ${DEQP_VK_SYNCHRONIZATION_SRCS})
 target_link_libraries(deqp-vk-synchronization ${DEQP_VK_SYNCHRONIZATION_LIBS})
index 341ab99..337f3da 100644 (file)
@@ -38,5 +38,7 @@ set(DEQP_VK_TESSELLATION_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_TESSELLATION_SRCS ../pch.cpp)
+
 add_library(deqp-vk-tessellation STATIC ${DEQP_VK_TESSELLATION_SRCS})
 target_link_libraries(deqp-vk-tessellation ${DEQP_VK_TESSELLATION_LIBS})
index 7114f10..3994a62 100644 (file)
@@ -36,5 +36,7 @@ set(DEQP_VK_TEXTURE_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_TEXTURE_SRCS ../pch.cpp)
+
 add_library(deqp-vk-texture STATIC ${DEQP_VK_TEXTURE_SRCS})
 target_link_libraries(deqp-vk-texture ${DEQP_VK_TEXTURE_LIBS})
index 38322db..9e1c37b 100644 (file)
@@ -16,5 +16,7 @@ set(DEQP_VK_UBO_LIBS
        vkutil
 )
 
+PCH(DEQP_VK_UBO_SRCS ../pch.cpp)
+
 add_library(deqp-vk-ubo STATIC ${DEQP_VK_UBO_SRCS})
 target_link_libraries(deqp-vk-ubo ${DEQP_VK_UBO_LIBS})
index a5f8aa9..2e66ff6 100644 (file)
@@ -26,5 +26,7 @@ set(DEQP_VK_WSI_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_WSI_SRCS ../pch.cpp)
+
 add_library(deqp-vk-wsi STATIC ${DEQP_VK_WSI_SRCS})
 target_link_libraries(deqp-vk-wsi ${DEQP_VK_WSI_LIBS})
index 7720add..6ed0508 100644 (file)
@@ -30,5 +30,7 @@ set(DEQP_VK_YCBCR_LIBS
        vkutil
        )
 
+PCH(DEQP_VK_YCBCR_SRCS ../pch.cpp)
+
 add_library(deqp-vk-ycbcr STATIC ${DEQP_VK_YCBCR_SRCS})
 target_link_libraries(deqp-vk-ycbcr ${DEQP_VK_YCBCR_LIBS})
index 264b6d7..36d9b9d 100644 (file)
@@ -102,5 +102,7 @@ set(TCUTIL_LIBS
        ${PNG_LIBRARY}
        )
 
+PCH(TCUTIL_SRCS ../pch.cpp)
+
 add_library(tcutil STATIC ${TCUTIL_SRCS})
 target_link_libraries(tcutil ${TCUTIL_LIBS} ${DEQP_PLATFORM_LIBRARIES})
index f410c6d..4f20687 100644 (file)
@@ -70,5 +70,7 @@ set(DECPP_LIBS
        deutil
        )
 
+PCH(DECPP_SRCS pch.cpp)
+
 add_library(decpp STATIC ${DECPP_SRCS})
 target_link_libraries(decpp ${DECPP_LIBS})
diff --git a/framework/delibs/decpp/pch.cpp b/framework/delibs/decpp/pch.cpp
new file mode 100644 (file)
index 0000000..b8d3f6c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pch.h"
diff --git a/framework/delibs/decpp/pch.h b/framework/delibs/decpp/pch.h
new file mode 100644 (file)
index 0000000..98db5ad
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _PCH_H
+#define _PCH_H
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "deRandom.hpp"
+#include "deStringUtil.hpp"
+#endif /* _PCH_H */
index f7a0bbb..795f560 100644 (file)
@@ -61,5 +61,7 @@ set(GLUTIL_LIBS
        glwrapper
        )
 
+PCH(GLUTIL_SRCS ../pch.cpp)
+
 add_library(glutil STATIC ${GLUTIL_SRCS})
 target_link_libraries(glutil ${GLUTIL_LIBS})
diff --git a/framework/pch.cpp b/framework/pch.cpp
new file mode 100644 (file)
index 0000000..b8d3f6c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pch.h"
diff --git a/framework/pch.h b/framework/pch.h
new file mode 100644 (file)
index 0000000..68ed5ca
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef _PCH_H
+#define _PCH_H
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "gluPixelTransfer.hpp"
+#include "gluStrUtil.hpp"
+#include "gluObjectWrapper.hpp"
+#include "gluContextInfo.hpp"
+#include "gluPixelTransfer.hpp"
+#include "gluRenderContext.hpp"
+#include "gluShaderProgram.hpp"
+#include "gluCallLogWrapper.hpp"
+#include "gluStrUtil.hpp"
+#include "tcuPixelFormat.hpp"
+#include "tcuEither.hpp"
+#include "tcuImageCompare.hpp"
+#include "tcuMaybe.hpp"
+#include "tcuResultCollector.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTestLog.hpp"
+#include "tcuTexture.hpp"
+#include "tcuTextureUtil.hpp"
+#include "tcuVector.hpp"
+#include "tcuVectorUtil.hpp"
+#include "tcuFloat.hpp"
+#include "deRandom.hpp"
+#include "deStringUtil.hpp"
+#include "rrFragmentOperations.hpp"
+#include "rrMultisamplePixelBufferAccess.hpp"
+#include "rrRenderer.hpp"
+#include "sglrGLContext.hpp"
+#include "sglrReferenceContext.hpp"
+#include "sglrReferenceUtils.hpp"
+#include "glwEnums.hpp"
+#include "glwFunctions.hpp"
+#endif /* _PCH_H */
index 19d37d7..5a66282 100644 (file)
@@ -48,6 +48,8 @@ set(RSG_SRCS
        rsgVariableValue.hpp
        )
 
+PCH(RSG_SRCS ../pch.cpp)
+
 add_library(randomshaders STATIC ${RSG_SRCS})
 target_link_libraries(randomshaders tcutil)
 
index 30269ac..5c68257 100644 (file)
@@ -27,5 +27,7 @@ set(RR_SRCS
        rrVertexPacket.hpp
        )
 
+PCH(RR_SRCS ../pch.cpp)
+
 add_library(referencerenderer STATIC ${RR_SRCS})
 target_link_libraries(referencerenderer tcutil)
index ee3eca8..7e1c5ca 100644 (file)
@@ -128,4 +128,10 @@ if (DEQP_SUPPORT_VG)
        set(DEQP_EGL_LIBS ${DEQP_EGL_LIBS} ${DEQP_VG_LIBRARIES})
 endif ()
 
+include_directories(
+       ../glshared
+       )
+
+PCH(DEQP_EGL_SRCS ../pch.cpp)
+
 add_deqp_module(deqp-egl "${DEQP_EGL_SRCS}" "${DEQP_EGL_LIBS}" teglTestPackageEntry.cpp)
index 6fd69fc..9a526b3 100644 (file)
@@ -11,5 +11,7 @@ set(DEQP_GLES2_ACCURACY_SRCS
        es2aVaryingInterpolationTests.hpp
        )
 
+PCH(DEQP_GLES2_ACCURACY_SRCS ../../pch.cpp)
+
 add_library(deqp-gles2-accuracy STATIC ${DEQP_GLES2_ACCURACY_SRCS})
 target_link_libraries(deqp-gles2-accuracy deqp-gl-shared glutil tcutil ${DEQP_GLES2_LIBRARIES})
index d10d0f8..d10d500 100644 (file)
@@ -163,5 +163,7 @@ set(DEQP_GLES2_FUNCTIONAL_SRCS
        es2fDebugMarkerTests.hpp
        )
 
+PCH(DEQP_GLES2_FUNCTIONAL_SRCS ../../pch.cpp)
+
 add_library(deqp-gles2-functional STATIC ${DEQP_GLES2_FUNCTIONAL_SRCS})
 target_link_libraries(deqp-gles2-functional deqp-gl-shared glutil glutil-sglr tcutil referencerenderer ${DEQP_GLES2_LIBRARIES})
index 80a56df..edbe1e4 100644 (file)
@@ -35,5 +35,7 @@ set(DEQP_GLES2_PERFORMANCE_SRCS
        es2pShaderCompilationCases.cpp
        )
 
+PCH(DEQP_GLES2_PERFORMANCE_SRCS ../../pch.cpp)
+
 add_library(deqp-gles2-performance STATIC ${DEQP_GLES2_PERFORMANCE_SRCS})
 target_link_libraries(deqp-gles2-performance deqp-gl-shared glutil tcutil ${DEQP_GLES2_LIBRARIES})
index 371c6a6..c51354e 100644 (file)
@@ -15,5 +15,7 @@ set(DEQP_GLES2_STRESS_SRCS
        es2sDrawTests.cpp
        )
 
+PCH(DEQP_GLES2_STRESS_SRCS ../../pch.cpp)
+
 add_library(deqp-gles2-stress STATIC ${DEQP_GLES2_STRESS_SRCS})
 target_link_libraries(deqp-gles2-stress deqp-gl-shared glutil tcutil ${DEQP_GLES2_LIBRARIES})
index 4bec278..0bee7e4 100644 (file)
@@ -11,5 +11,7 @@ set(DEQP_GLES3_ACCURACY_SRCS
        es3aVaryingInterpolationTests.hpp
        )
 
+PCH(DEQP_GLES3_ACCURACY_SRCS ../../pch.cpp)
+
 add_library(deqp-gles3-accuracy STATIC ${DEQP_GLES3_ACCURACY_SRCS})
 target_link_libraries(deqp-gles3-accuracy deqp-gl-shared glutil tcutil ${DEQP_GLES3_LIBRARIES})
index 04d509f..48ce10b 100644 (file)
@@ -215,5 +215,7 @@ set(DEQP_GLES3_FUNCTIONAL_SRCS
        es3fShaderFragDataTests.hpp
        )
 
+PCH(DEQP_GLES3_FUNCTIONAL_SRCS ../../pch.cpp)
+
 add_library(deqp-gles3-functional STATIC ${DEQP_GLES3_FUNCTIONAL_SRCS})
 target_link_libraries(deqp-gles3-functional deqp-gl-shared glutil glutil-sglr tcutil referencerenderer ${DEQP_GLES3_LIBRARIES})
index 8840b3f..35e6960 100644 (file)
@@ -35,5 +35,7 @@ set(DEQP_GLES3_PERFORMANCE_SRCS
        es3pDepthTests.cpp
        )
 
+PCH(DEQP_GLES3_PERFORMANCE_SRCS ../../pch.cpp)
+
 add_library(deqp-gles3-performance STATIC ${DEQP_GLES3_PERFORMANCE_SRCS})
 target_link_libraries(deqp-gles3-performance deqp-gl-shared glutil tcutil ${DEQP_GLES3_LIBRARIES})
index 437da2b..067b32f 100644 (file)
@@ -23,5 +23,7 @@ set(DEQP_GLES3_STRESS_SRCS
        es3sLongRunningShaderTests.hpp
        )
 
+PCH(DEQP_GLES3_STRESS_SRCS ../../pch.cpp)
+
 add_library(deqp-gles3-stress STATIC ${DEQP_GLES3_STRESS_SRCS})
 target_link_libraries(deqp-gles3-stress deqp-gl-shared glutil tcutil ${DEQP_GLES3_LIBRARIES})
index cfaa312..f45c414 100644 (file)
@@ -197,5 +197,7 @@ set(DEQP_GLES31_FUNCTIONAL_SRCS
        es31fShaderUniformIntegerFunctionTests.hpp
        )
 
+PCH(DEQP_GLES31_FUNCTIONAL_SRCS ../../pch.cpp)
+
 add_library(deqp-gles31-functional STATIC ${DEQP_GLES31_FUNCTIONAL_SRCS})
 target_link_libraries(deqp-gles31-functional deqp-gl-shared glutil glutil-sglr tcutil referencerenderer ${DEQP_OPENGL_LIBRARIES})
index 3bed4e3..7a49448 100644 (file)
@@ -11,5 +11,7 @@ set(DEQP_GLES31_STRESS_SRCS
        es31sTessellationGeometryInteractionTests.hpp
        )
 
+PCH(DEQP_GLES31_STRESS_SRCS ../../pch.cpp)
+
 add_library(deqp-gles31-stress STATIC ${DEQP_GLES31_STRESS_SRCS})
 target_link_libraries(deqp-gles31-stress deqp-gl-shared glutil tcutil ${DEQP_GLES31_LIBRARIES})
index 2542646..d835874 100644 (file)
@@ -1,5 +1,9 @@
 # Shared GL(ES) test code
 
+include_directories(
+       .
+       )
+
 set(DEQP_GL_SHARED_SRCS
        glsBuiltinPrecisionTests.cpp
        glsBuiltinPrecisionTests.hpp
@@ -69,5 +73,7 @@ set(DEQP_GL_SHARED_SRCS
        glsTextureBufferCase.cpp
        )
 
+PCH(DEQP_GL_SHARED_SRCS ../pch.cpp)
+
 add_library(deqp-gl-shared STATIC ${DEQP_GL_SHARED_SRCS})
 target_link_libraries(deqp-gl-shared glutil glwrapper randomshaders tcutil glutil-sglr)
diff --git a/modules/pch.cpp b/modules/pch.cpp
new file mode 100644 (file)
index 0000000..b8d3f6c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pch.h"
diff --git a/modules/pch.h b/modules/pch.h
new file mode 100644 (file)
index 0000000..a7f235d
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef _PCH_H
+#define _PCH_H
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "glsFragmentOpUtil.hpp"
+#include "glsShaderLibrary.hpp"
+#include "glsStateQueryUtil.hpp"
+#include "glsTextureTestUtil.hpp"
+#include "gluPixelTransfer.hpp"
+#include "gluStrUtil.hpp"
+#include "gluObjectWrapper.hpp"
+#include "gluContextInfo.hpp"
+#include "gluPixelTransfer.hpp"
+#include "gluRenderContext.hpp"
+#include "gluShaderProgram.hpp"
+#include "gluCallLogWrapper.hpp"
+#include "gluStrUtil.hpp"
+#include "tcuPixelFormat.hpp"
+#include "tcuEither.hpp"
+#include "tcuImageCompare.hpp"
+#include "tcuMaybe.hpp"
+#include "tcuResultCollector.hpp"
+#include "tcuStringTemplate.hpp"
+#include "tcuTestLog.hpp"
+#include "tcuTexture.hpp"
+#include "tcuTextureUtil.hpp"
+#include "tcuVector.hpp"
+#include "tcuVectorUtil.hpp"
+#include "tcuFloat.hpp"
+#include "deRandom.hpp"
+#include "deStringUtil.hpp"
+#include "rrFragmentOperations.hpp"
+#include "rrMultisamplePixelBufferAccess.hpp"
+#include "rrRenderer.hpp"
+#include "sglrGLContext.hpp"
+#include "sglrReferenceContext.hpp"
+#include "sglrReferenceUtils.hpp"
+#include "glwEnums.hpp"
+#include "glwFunctions.hpp"
+#endif /* _PCH_H */