Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3a5974f

Browse files
jvanverthSkia Commit-Bot
authored andcommitted
Add Direct3D compile bots
Bug: skia:9935 Change-Id: I6d9c14ac674dee89a5a8ba726d99b4423c40eb9b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274861 Reviewed-by: Eric Boren <[email protected]> Reviewed-by: Greg Daniel <[email protected]> Commit-Queue: Jim Van Verth <[email protected]>
1 parent eced98b commit 3a5974f

File tree

10 files changed

+451
-32
lines changed

10 files changed

+451
-32
lines changed

include/gpu/GrBackendSurface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GrGLTextureParameters;
3131
#endif
3232

3333
#ifdef SK_DIRECT3D
34-
enum DXGI_FORMAT;
34+
#include <dxgiformat.h>
3535
#endif
3636

3737
#if GR_TEST_UTILS

infra/bots/jobs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,14 @@
110110
"Build-Win-Clang-x86-Release",
111111
"Build-Win-Clang-x86_64-Debug",
112112
"Build-Win-Clang-x86_64-Debug-ANGLE",
113+
"Build-Win-Clang-x86_64-Debug-Direct3D",
113114
"Build-Win-Clang-x86_64-Debug-ASAN",
114115
"Build-Win-Clang-x86_64-Debug-OpenCL",
115116
"Build-Win-Clang-x86_64-Debug-Vulkan",
116117
"Build-Win-Clang-x86_64-Debug-Wuffs",
117118
"Build-Win-Clang-x86_64-Release",
118119
"Build-Win-Clang-x86_64-Release-ANGLE",
120+
"Build-Win-Clang-x86_64-Release-Direct3D",
119121
"Build-Win-Clang-x86_64-Release-Shared",
120122
"Build-Win-Clang-x86_64-Release-Dawn",
121123
"Build-Win-Clang-x86_64-Release-Vulkan",
@@ -126,9 +128,11 @@
126128
"Build-Win-MSVC-x86-Debug",
127129
"Build-Win-MSVC-x86-Release",
128130
"Build-Win-MSVC-x86_64-Debug",
131+
"Build-Win-MSVC-x86_64-Debug-Direct3D",
129132
"Build-Win-MSVC-x86_64-Debug-Vulkan",
130133
"Build-Win-MSVC-x86_64-Debug-Wuffs",
131134
"Build-Win-MSVC-x86_64-Release",
135+
"Build-Win-MSVC-x86_64-Release-Direct3D",
132136
"Build-Win-MSVC-x86_64-Release-Shared",
133137
"Build-Win-MSVC-x86_64-Release-Vulkan",
134138
"BuildStats-Debian9-Clang-arm-Release-Flutter_Android",

infra/bots/recipe_modules/build/default.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ def compile_fn(api, checkout_root, out_dir):
269269
args['skia_enable_vulkan_debug_layers'] = 'true'
270270
if 'MoltenVK' in extra_tokens:
271271
args['skia_moltenvk_path'] = '"%s"' % moltenvk
272+
if 'Direct3D' in extra_tokens:
273+
args['skia_use_direct3d'] = 'true'
272274
if 'Metal' in extra_tokens:
273275
args['skia_use_metal'] = 'true'
274276
if 'OpenCL' in extra_tokens:
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
{
3+
"cmd": [
4+
"vpython",
5+
"-u",
6+
"RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
7+
"--json-output",
8+
"/path/to/tmp/json",
9+
"copy",
10+
"[START_DIR]\\cache\\work\\skia\\infra\\bots\\assets\\clang_win\\VERSION",
11+
"/path/to/tmp/"
12+
],
13+
"infra_step": true,
14+
"name": "Get clang_win VERSION",
15+
"~followup_annotations": [
16+
"@@@STEP_LOG_LINE@VERSION@42@@@",
17+
"@@@STEP_LOG_END@VERSION@@@"
18+
]
19+
},
20+
{
21+
"cmd": [
22+
"python",
23+
"-u",
24+
"[START_DIR]\\cache\\work\\skia\\bin\\fetch-gn"
25+
],
26+
"cwd": "[START_DIR]\\cache\\work\\skia",
27+
"env": {
28+
"CHROME_HEADLESS": "1",
29+
"PATH": "<PATH>;RECIPE_REPO[depot_tools]"
30+
},
31+
"infra_step": true,
32+
"name": "fetch-gn"
33+
},
34+
{
35+
"cmd": [
36+
"[START_DIR]\\cache\\work\\skia\\bin\\gn",
37+
"gen",
38+
"[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Direct3D\\Release_x64",
39+
"--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_use_direct3d=true target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
40+
],
41+
"cwd": "[START_DIR]\\cache\\work\\skia",
42+
"env": {
43+
"CHROME_HEADLESS": "1",
44+
"PATH": "<PATH>;RECIPE_REPO[depot_tools]"
45+
},
46+
"name": "gn gen"
47+
},
48+
{
49+
"cmd": [
50+
"ninja",
51+
"-C",
52+
"[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Direct3D\\Release_x64"
53+
],
54+
"cwd": "[START_DIR]\\cache\\work\\skia",
55+
"env": {
56+
"CHROME_HEADLESS": "1",
57+
"PATH": "<PATH>;RECIPE_REPO[depot_tools]"
58+
},
59+
"name": "ninja"
60+
},
61+
{
62+
"cmd": [
63+
"python",
64+
"-u",
65+
"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', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'hello-opencl', 'hello-opencl.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk', 'whitelist_devices.json']\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",
66+
"[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Direct3D\\Release_x64",
67+
"[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64"
68+
],
69+
"infra_step": true,
70+
"name": "copy build products",
71+
"~followup_annotations": [
72+
"@@@[email protected]@import errno@@@",
73+
"@@@[email protected]@import glob@@@",
74+
"@@@[email protected]@import os@@@",
75+
"@@@[email protected]@import shutil@@@",
76+
"@@@[email protected]@import sys@@@",
77+
78+
"@@@[email protected]@src = sys.argv[1]@@@",
79+
"@@@[email protected]@dst = sys.argv[2]@@@",
80+
"@@@[email protected]@build_products = ['dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'hello-opencl', 'hello-opencl.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk', 'whitelist_devices.json']@@@",
81+
82+
"@@@[email protected]@try:@@@",
83+
"@@@[email protected]@ os.makedirs(dst)@@@",
84+
"@@@[email protected]@except OSError as e:@@@",
85+
"@@@[email protected]@ if e.errno != errno.EEXIST:@@@",
86+
"@@@[email protected]@ raise@@@",
87+
88+
"@@@[email protected]@for pattern in build_products:@@@",
89+
"@@@[email protected]@ path = os.path.join(src, pattern)@@@",
90+
"@@@[email protected]@ for f in glob.glob(path):@@@",
91+
"@@@[email protected]@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
92+
"@@@[email protected]@ if not os.path.isdir(os.path.dirname(dst_path)):@@@",
93+
"@@@[email protected]@ os.makedirs(os.path.dirname(dst_path))@@@",
94+
"@@@[email protected]@ print 'Copying build product %s to %s' % (f, dst_path)@@@",
95+
"@@@[email protected]@ shutil.move(f, dst_path)@@@",
96+
97+
]
98+
},
99+
{
100+
"name": "$result"
101+
}
102+
]

infra/bots/recipe_modules/build/examples/full.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def RunSteps(api):
7575
'Build-Win-Clang-x86-Debug-Exceptions',
7676
'Build-Win-Clang-x86_64-Debug-ANGLE',
7777
'Build-Win-Clang-x86_64-Debug-OpenCL',
78+
'Build-Win-Clang-x86_64-Release-Direct3D',
7879
'Build-Win-Clang-x86_64-Release-Shared',
7980
"Build-Win-Clang-x86_64-Release-Dawn",
8081
'Build-Win-Clang-x86_64-Release-Vulkan',

0 commit comments

Comments
 (0)