diff --git a/BUILD.gn b/BUILD.gn index b9004ec6cf..09dda8a700 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1803,9 +1803,7 @@ if (skia_enable_tools) { } } - # We need the GLTestContext on Vulkan-only builds for the persistent GL context workaround in - # in GrContextFactory. This only matters for OSes that can run Vulkan. - if ((skia_use_gl || skia_use_vulkan) && target_cpu != "wasm") { + if (skia_use_gl && target_cpu != "wasm") { if (is_android || skia_use_egl) { sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] libs += [ "EGL" ] diff --git a/dm/DM.cpp b/dm/DM.cpp index c2bef2eda0..0eeca586f0 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -175,8 +175,10 @@ int RuntimeCheckErrorFunc(int errorType, const char* filename, int linenumber, using namespace DM; using sk_gpu_test::GrContextFactory; -using sk_gpu_test::GLTestContext; using sk_gpu_test::ContextInfo; +#ifdef SK_GL +using sk_gpu_test::GLTestContext; +#endif /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ diff --git a/dm/DMGpuTestProcs.cpp b/dm/DMGpuTestProcs.cpp index 268fd8835a..9f6efe570c 100644 --- a/dm/DMGpuTestProcs.cpp +++ b/dm/DMGpuTestProcs.cpp @@ -15,9 +15,12 @@ #endif using sk_gpu_test::GrContextFactory; -using sk_gpu_test::GLTestContext; using sk_gpu_test::ContextInfo; +#ifdef SK_GL +using sk_gpu_test::GLTestContext; +#endif + namespace skiatest { bool IsGLContextType(sk_gpu_test::GrContextFactory::ContextType type) { diff --git a/infra/bots/gen_tasks_logic/dm_flags.go b/infra/bots/gen_tasks_logic/dm_flags.go index c32f1b8d13..5b58f2cfaf 100644 --- a/infra/bots/gen_tasks_logic/dm_flags.go +++ b/infra/bots/gen_tasks_logic/dm_flags.go @@ -618,6 +618,11 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { if b.extraConfig("TSAN") { // skbug.com/10848 removeFromArgs("svg") + // skbug.com/12900 avoid OOM on + // Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan + if b.Name == "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan" { + skip("_", "test", "_", "_") + } } // TODO: ??? diff --git a/infra/bots/recipe_modules/build/default.py b/infra/bots/recipe_modules/build/default.py index edfaca4b57..ed29b33f61 100644 --- a/infra/bots/recipe_modules/build/default.py +++ b/infra/bots/recipe_modules/build/default.py @@ -48,8 +48,6 @@ def compile_swiftshader(api, extra_tokens, swiftshader_root, cc, cxx, out): san = None if 'MSAN' in extra_tokens: san = ('msan','memory') - elif 'TSAN' in extra_tokens: - san = ('tsan','thread') if san: short,full = san @@ -282,7 +280,12 @@ def compile_fn(api, checkout_root, out_dir): if 'Vulkan' in extra_tokens and not 'Android' in extra_tokens: args['skia_use_vulkan'] = 'true' args['skia_enable_vulkan_debug_layers'] = 'true' - args['skia_use_gl'] = 'false' + # When running TSAN with Vulkan on NVidia, we experienced some timeouts. We found + # a workaround (in GrContextFactory) that requires GL (in addition to Vulkan). + if 'TSAN' in extra_tokens: + args['skia_use_gl'] = 'true' + else: + args['skia_use_gl'] = 'false' if 'Direct3D' in extra_tokens: args['skia_use_direct3d'] = 'true' args['skia_use_gl'] = 'false' diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN.json deleted file mode 100644 index 1ca4374747..0000000000 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN.json +++ /dev/null @@ -1,234 +0,0 @@ -[ - { - "cmd": [ - "vpython", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/cache/work/skia/infra/bots/assets/clang_linux/VERSION", - "/path/to/tmp/" - ], - "infra_step": true, - "name": "Get clang_linux VERSION", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@VERSION@42@@@", - "@@@STEP_LOG_END@VERSION@@@" - ] - }, - { - "cmd": [ - "vpython", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug/swiftshader_out" - ], - "infra_step": true, - "name": "makedirs swiftshader_out" - }, - { - "cmd": [ - "cmake", - "-DSWIFTSHADER_BUILD_TESTS=OFF", - "-DSWIFTSHADER_WARNINGS_AS_ERRORS=OFF", - "-DREACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION=OFF", - "-DSWIFTSHADER_TSAN=ON", - "-DCMAKE_C_FLAGS=-fsanitize=thread -stdlib=libc++ -L[START_DIR]/clang_linux/tsan/lib -lc++abi -I[START_DIR]/clang_linux/tsan/include -I[START_DIR]/clang_linux/tsan/include/c++/v1 -Wno-unused-command-line-argument", - "-DCMAKE_CXX_FLAGS=-fsanitize=thread -stdlib=libc++ -L[START_DIR]/clang_linux/tsan/lib -lc++abi -I[START_DIR]/clang_linux/tsan/include -I[START_DIR]/clang_linux/tsan/include/c++/v1 -Wno-unused-command-line-argument", - "[START_DIR]/cache/work/skia/third_party/externals/swiftshader", - "-GNinja" - ], - "cwd": "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug/swiftshader_out", - "env": { - "CC": "[START_DIR]/clang_linux/bin/clang", - "CHROME_HEADLESS": "1", - "CXX": "[START_DIR]/clang_linux/bin/clang++", - "PATH": ":RECIPE_REPO[depot_tools]:[START_DIR]/cmake_linux/bin", - "SWIFTSHADER_MSAN_INSTRUMENTED_LIBCXX_PATH": "/totally/phony/path" - }, - "name": "swiftshader cmake" - }, - { - "cmd": [ - "ninja", - "-C", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug/swiftshader_out", - "vk_swiftshader" - ], - "cwd": "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug/swiftshader_out", - "env": { - "CC": "[START_DIR]/clang_linux/bin/clang", - "CHROME_HEADLESS": "1", - "CXX": "[START_DIR]/clang_linux/bin/clang++", - "PATH": ":RECIPE_REPO[depot_tools]:[START_DIR]/cmake_linux/bin", - "SWIFTSHADER_MSAN_INSTRUMENTED_LIBCXX_PATH": "/totally/phony/path" - }, - "name": "swiftshader ninja" - }, - { - "cmd": [ - "python", - "-u", - "[START_DIR]/cache/work/skia/bin/fetch-gn" - ], - "cwd": "[START_DIR]/cache/work/skia", - "env": { - "CHROME_HEADLESS": "1", - "PATH": ":RECIPE_REPO[depot_tools]" - }, - "infra_step": true, - "name": "fetch-gn" - }, - { - "cmd": [ - "[START_DIR]/ccache_linux/bin/ccache", - "-s" - ], - "cwd": "[START_DIR]/cache/work/skia", - "env": { - "CCACHE_COMPILERCHECK": "content", - "CCACHE_DIR": "[START_DIR]/cache/ccache", - "CCACHE_MAXFILES": "0", - "CCACHE_MAXSIZE": "75G", - "CHROME_HEADLESS": "1", - "PATH": ":RECIPE_REPO[depot_tools]" - }, - "name": "ccache stats-start" - }, - { - "cmd": [ - "[START_DIR]/cache/work/skia/bin/gn", - "gen", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug", - "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cc_wrapper=\"[START_DIR]/ccache_linux/bin/ccache\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DPLACEHOLDER_clang_linux_version=42\", \"-O1\", \"-DSK_GPU_TOOLS_VK_LIBRARY_NAME=[START_DIR]/[SWARM_OUT_DIR]/swiftshader_out/libvk_swiftshader.so\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/tsan\"] sanitize=\"TSAN\" skia_use_vulkan=true target_cpu=\"x86_64\" werror=true" - ], - "cwd": "[START_DIR]/cache/work/skia", - "env": { - "CCACHE_COMPILERCHECK": "content", - "CCACHE_DIR": "[START_DIR]/cache/ccache", - "CCACHE_MAXFILES": "0", - "CCACHE_MAXSIZE": "75G", - "CHROME_HEADLESS": "1", - "PATH": ":RECIPE_REPO[depot_tools]" - }, - "name": "gn gen" - }, - { - "cmd": [ - "ninja", - "-C", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug" - ], - "cwd": "[START_DIR]/cache/work/skia", - "env": { - "CCACHE_COMPILERCHECK": "content", - "CCACHE_DIR": "[START_DIR]/cache/ccache", - "CCACHE_MAXFILES": "0", - "CCACHE_MAXSIZE": "75G", - "CHROME_HEADLESS": "1", - "PATH": ":RECIPE_REPO[depot_tools]" - }, - "name": "ninja" - }, - { - "cmd": [ - "[START_DIR]/ccache_linux/bin/ccache", - "-s" - ], - "cwd": "[START_DIR]/cache/work/skia", - "env": { - "CCACHE_COMPILERCHECK": "content", - "CCACHE_DIR": "[START_DIR]/cache/ccache", - "CCACHE_MAXFILES": "0", - "CCACHE_MAXSIZE": "75G", - "CHROME_HEADLESS": "1", - "PATH": ":RECIPE_REPO[depot_tools]" - }, - "name": "ccache stats-end" - }, - { - "cmd": [ - "python", - "-u", - "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print('Copying build product %s to %s' % (f, dst_path))\n shutil.move(f, dst_path)\n", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug", - "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" - ], - "infra_step": true, - "name": "copy build products", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import errno@@@", - "@@@STEP_LOG_LINE@python.inline@import glob@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import shutil@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@build_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", - "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", - "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@", - "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", - "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", - "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", - "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", - "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", - "@@@STEP_LOG_LINE@python.inline@ print('Copying build product %s to %s' % (f, dst_path))@@@", - "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print('Copying build product %s to %s' % (f, dst_path))\n shutil.move(f, dst_path)\n", - "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN/Debug/swiftshader_out", - "[START_DIR]/[SWARM_OUT_DIR]/swiftshader_out" - ], - "infra_step": true, - "name": "copy build products (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@import errno@@@", - "@@@STEP_LOG_LINE@python.inline@import glob@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import shutil@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@build_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@try:@@@", - "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", - "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", - "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@", - "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", - "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", - "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", - "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", - "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", - "@@@STEP_LOG_LINE@python.inline@ print('Copying build product %s to %s' % (f, dst_path))@@@", - "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN.json new file mode 100644 index 0000000000..886059c971 --- /dev/null +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN.json @@ -0,0 +1,142 @@ +[ + { + "cmd": [ + "vpython", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/cache/work/skia/infra/bots/assets/clang_linux/VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get clang_linux VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@VERSION@42@@@", + "@@@STEP_LOG_END@VERSION@@@" + ] + }, + { + "cmd": [ + "python", + "-u", + "[START_DIR]/cache/work/skia/bin/fetch-gn" + ], + "cwd": "[START_DIR]/cache/work/skia", + "env": { + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "infra_step": true, + "name": "fetch-gn" + }, + { + "cmd": [ + "[START_DIR]/ccache_linux/bin/ccache", + "-s" + ], + "cwd": "[START_DIR]/cache/work/skia", + "env": { + "CCACHE_COMPILERCHECK": "content", + "CCACHE_DIR": "[START_DIR]/cache/ccache", + "CCACHE_MAXFILES": "0", + "CCACHE_MAXSIZE": "75G", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "name": "ccache stats-start" + }, + { + "cmd": [ + "[START_DIR]/cache/work/skia/bin/gn", + "gen", + "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN/Debug", + "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cc_wrapper=\"[START_DIR]/ccache_linux/bin/ccache\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DPLACEHOLDER_clang_linux_version=42\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/tsan\"] sanitize=\"TSAN\" skia_enable_vulkan_debug_layers=true skia_use_gl=true skia_use_vulkan=true target_cpu=\"x86_64\" werror=true" + ], + "cwd": "[START_DIR]/cache/work/skia", + "env": { + "CCACHE_COMPILERCHECK": "content", + "CCACHE_DIR": "[START_DIR]/cache/ccache", + "CCACHE_MAXFILES": "0", + "CCACHE_MAXSIZE": "75G", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-C", + "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN/Debug" + ], + "cwd": "[START_DIR]/cache/work/skia", + "env": { + "CCACHE_COMPILERCHECK": "content", + "CCACHE_DIR": "[START_DIR]/cache/ccache", + "CCACHE_MAXFILES": "0", + "CCACHE_MAXSIZE": "75G", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "name": "ninja" + }, + { + "cmd": [ + "[START_DIR]/ccache_linux/bin/ccache", + "-s" + ], + "cwd": "[START_DIR]/cache/work/skia", + "env": { + "CCACHE_COMPILERCHECK": "content", + "CCACHE_DIR": "[START_DIR]/cache/ccache", + "CCACHE_MAXFILES": "0", + "CCACHE_MAXSIZE": "75G", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_REPO[depot_tools]" + }, + "name": "ccache stats-end" + }, + { + "cmd": [ + "python", + "-u", + "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print('Copying build product %s to %s' % (f, dst_path))\n shutil.move(f, dst_path)\n", + "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN/Debug", + "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" + ], + "infra_step": true, + "name": "copy build products", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@python.inline@import errno@@@", + "@@@STEP_LOG_LINE@python.inline@import glob@@@", + "@@@STEP_LOG_LINE@python.inline@import os@@@", + "@@@STEP_LOG_LINE@python.inline@import shutil@@@", + "@@@STEP_LOG_LINE@python.inline@import sys@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", + "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", + "@@@STEP_LOG_LINE@python.inline@build_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@try:@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", + "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", + "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", + "@@@STEP_LOG_LINE@python.inline@ raise@@@", + "@@@STEP_LOG_LINE@python.inline@@@@", + "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@", + "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", + "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", + "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", + "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", + "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ print('Copying build product %s to %s' % (f, dst_path))@@@", + "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", + "@@@STEP_LOG_END@python.inline@@@" + ] + }, + { + "name": "$result" + } +] \ No newline at end of file diff --git a/infra/bots/recipe_modules/build/examples/full.py b/infra/bots/recipe_modules/build/examples/full.py index b5b42ec5e4..1a4171c1aa 100644 --- a/infra/bots/recipe_modules/build/examples/full.py +++ b/infra/bots/recipe_modules/build/examples/full.py @@ -41,12 +41,12 @@ TEST_BUILDERS = [ 'Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES', 'Build-Debian10-Clang-x86_64-Debug-Coverage', 'Build-Debian10-Clang-x86_64-Debug-MSAN', - 'Build-Debian10-Clang-x86_64-Debug-TSAN', 'Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41', 'Build-Debian10-Clang-x86_64-Debug-SafeStack', 'Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN', - 'Build-Debian10-Clang-x86_64-Debug-SwiftShader_TSAN', + 'Build-Debian10-Clang-x86_64-Debug-TSAN', 'Build-Debian10-Clang-x86_64-Debug-Tidy', + 'Build-Debian10-Clang-x86_64-Debug-Vulkan_TSAN', 'Build-Debian10-Clang-x86_64-Debug-Wuffs', 'Build-Debian10-Clang-x86_64-Release-ANGLE', 'Build-Debian10-Clang-x86_64-Release-ASAN', diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 6fc4580cda..8401c62ead 100755 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -52907,7 +52907,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"TSAN_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced1.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced2.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced3.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".arw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".cr2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".dng\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nrw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".orf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".raf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".rw2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".pef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".srw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ARW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".CR2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".DNG\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NRW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ORF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RAF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RW2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".PEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".SRW\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Arrays_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Structs_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Types_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Vectors_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan\\\",\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\",\\\"task_id\\\":\\\"<(TASK_ID)\\\"}\",\"do_upload\":\"false\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"images\":\"true\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"resources\":\"true\",\"revision\":\"<(REVISION)\",\"skps\":\"true\",\"svgs\":\"true\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"TSAN_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced1.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced2.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced3.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".arw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".cr2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".dng\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nrw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".orf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".raf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".rw2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".pef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".srw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ARW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".CR2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".DNG\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NRW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ORF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RAF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RW2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".PEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".SRW\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Arrays_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Structs_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Types_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLRecursiveComparison_Vectors_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan\\\",\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\",\\\"task_id\\\":\\\"<(TASK_ID)\\\"}\",\"do_upload\":\"false\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"images\":\"true\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"resources\":\"true\",\"revision\":\"<(REVISION)\",\"skps\":\"true\",\"svgs\":\"true\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ diff --git a/modules/canvaskit/canvaskit_bindings.cpp b/modules/canvaskit/canvaskit_bindings.cpp index 1c7c0e9244..2197507db1 100644 --- a/modules/canvaskit/canvaskit_bindings.cpp +++ b/modules/canvaskit/canvaskit_bindings.cpp @@ -1352,7 +1352,7 @@ EMSCRIPTEN_BINDINGS(Skia) { class_("Image") .smart_ptr>("sk_sp") -#if SK_GL +#ifdef SK_GL .class_function("_makeFromGenerator", &MakeImageFromGenerator) #endif // Note that this needs to be cleaned up with delete(). diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp index c3966abbb0..81acded4b4 100644 --- a/tests/PathRendererCacheTests.cpp +++ b/tests/PathRendererCacheTests.cpp @@ -14,6 +14,7 @@ #include "src/gpu/GrRecordingContextPriv.h" #include "src/gpu/GrResourceCache.h" #include "src/gpu/GrStyle.h" +#include "src/gpu/GrUserStencilSettings.h" #include "src/gpu/effects/GrPorterDuffXferProcessor.h" #include "src/gpu/geometry/GrStyledShape.h" #include "src/gpu/ops/SoftwarePathRenderer.h" diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index 61542f527f..099b95d8ab 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -10,6 +10,7 @@ #include "include/core/SkSurface.h" #include "include/gpu/GrDirectContext.h" #include "src/core/SkConvertPixels.h" +#include "src/gpu/GrDataUtils.h" #include "src/gpu/GrPixmap.h" #include "tests/Test.h" #include "tools/ToolUtils.h" diff --git a/tests/TriangulatingPathRendererTests.cpp b/tests/TriangulatingPathRendererTests.cpp index 25f59fe30a..8f4febd08d 100644 --- a/tests/TriangulatingPathRendererTests.cpp +++ b/tests/TriangulatingPathRendererTests.cpp @@ -14,6 +14,7 @@ #include "src/gpu/GrDirectContextPriv.h" #include "src/gpu/GrEagerVertexAllocator.h" #include "src/gpu/GrStyle.h" +#include "src/gpu/GrUserStencilSettings.h" #include "src/gpu/effects/GrPorterDuffXferProcessor.h" #include "src/gpu/geometry/GrAATriangulator.h" #include "src/gpu/geometry/GrInnerFanTriangulator.h" diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 485d278dd2..8702496e17 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -242,10 +242,10 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv if (!testCtx) { return ContextInfo(); } - +#ifdef SK_GL // We previously had an issue where the VkDevice destruction would occasionally hang - // on systems with NVIDIA GPUs and having an existing GL context fixed it. Now (March - // 2020) we still need the GL context to keep Vulkan/TSAN bots from running incredibly + // on systems with NVIDIA GPUs and having an existing GL context fixed it. Now (Feb + // 2022) we still need the GL context to keep Vulkan/TSAN bots from running incredibly // slow. Perhaps this prevents repeated driver loading/unloading? Note that keeping // a persistent VkTestContext around instead was tried and did not work. if (!fSentinelGLContext) { @@ -254,6 +254,7 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv fSentinelGLContext.reset(CreatePlatformGLTestContext(kGLES_GrGLStandard)); } } +#endif break; } #endif diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index d9ab850de0..ea63ff7dcb 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -12,7 +12,11 @@ #include "include/gpu/GrDirectContext.h" #include "include/private/SkTArray.h" + +#ifdef SK_GL #include "tools/gpu/gl/GLTestContext.h" +#endif +#include "tools/gpu/TestContext.h" struct GrVkBackendContext; @@ -165,7 +169,10 @@ private: bool fAbandoned; }; SkTArray fContexts; +#ifdef SK_GL std::unique_ptr fSentinelGLContext; +#endif + const GrContextOptions fGlobalOptions; };